code: private void stopScript(String line, DispatchCallback callback) {
      try {
        sqlLine.getScriptOutputFile().close();
      } catch (Exception e) {
        sqlLine.handleException(e);
      }
  
      sqlLine.output(sqlLine.loc("script-closed", sqlLine.getScriptOutputFile()));
      sqlLine.setScriptOutputFile(null);
      callback.setToSuccess();
    }
docs: Stop writing to the script file and close the script.