code: private static void log(File logFile, long connectionId, char separator, String line) {
  		synchronized(logFile) {
  			try {
  				try (Writer out = new FileWriter(logFile, true)) {
  					out.write(Long.toString(connectionId));
  					out.write(separator);
  					out.write(' ');
  					out.write(line);
  					out.write('\n');
  				}
  			} catch(IOException e) {
  				e.printStackTrace(System.err);
  			}
  		}
  	}
docs: Writes one line to the given file, synchronizes on the file object.