Committing changes to output into a file rather than on screen