docs: public static void printToFileLn(File file, String message, boolean append) {
      PrintWriter pw = null;
      try {
        Writer fw = new FileWriter(file, append);
        pw = new PrintWriter(fw);
        pw.println(message);
      } catch (Exception e) {
        System.err.println("Exception: in printToFileLn " + file.getAbsolutePath() + ' ' + message);
        e.printStackTrace();
      } finally {
        if (pw != null) {
          pw.flush();
          pw.close();
        }
      }
    }