Ensure output from PrettyFormatter is written as entire lines with a flush after each line