Write the output screen to file