Multiple threads writing to the output stream is unsynchronized and
inherently unsafe. The PrintStream should be wrapped in a method that is
synchronized.