code: protected final void writeln(String s, boolean escapeNewlines) {
      assert tmpfile != null : "No text file is currently being written";
      tmpfile.append(escapeNewlines ? StringEscapeUtils.escapeNewlines(s) : s);
      tmpfile.append('\n');
    }
docs: Write a single line of text to a previously opened text file, escape new line characters if enabled.