Flush screen and file output.