Changed publication error to use OS specific newlines. Compatible with
Java 6.