Changed TxtFormatter's write_output method to buffer all output and print to console in a single call.