code: private synchronized void print(String output) {
          if (generateOneDoc) 
              writer.print(output);
          else 
              writer.println(output);
      }
docs: Writes strings to the resulting file.