Allow for quick switching between outputting to stdout or a file