docs: private void writeStringToFile(String str, File file) throws IOException {
          if (!file.exists() && file.isDirectory()) {
              return;
          }
  
          try (BufferedWriter bw = new BufferedWriter(WriterFactory.newWriter(file, this.encoding))) {
              bw.write(str);
          }
      }