Partial fix for issue #6, save output to file. Supported for windows