docs: public static void writeStringToFile(String contents, String path, String encoding) throws IOException {
  		OutputStream writer = null;
  		if (path.endsWith(".gz")) {
        writer = new GZIPOutputStream(new FileOutputStream(path));
      } else {
        writer = new BufferedOutputStream(new FileOutputStream(path));
      }
  		writer.write(contents.getBytes(encoding));
  	}