code: public void open(Path errFilePath) throws IOException {
      this.fs.mkdirs(errFilePath.getParent());
      OutputStream os =
          this.closer.register(this.fs.exists(errFilePath) ? this.fs.append(errFilePath) : this.fs.create(errFilePath));
      this.writer = this.closer
          .register(new BufferedWriter(new OutputStreamWriter(os, ConfigurationKeys.DEFAULT_CHARSET_ENCODING)));
    }
docs: Open a BufferedWriter
  @param errFilePath path to write the file