Use context manager for output_file
Merge pull request #86 from msabramo/context_mgr

Use context manager for output_file