fixed a thread safety issue with buffering.  System.out.println does some different buffering on Linux compared to OSX (it seems to flush before adding a new line, so it ends up making 2 write calls)