Improved OutputFormat by removing direct printing to output file.
Whitespace changed in small ways again in expected output.