Use a thunk to cause outfile to be closed
Merge pull request #12 from dmbates/master

Use a thunk to cause outfile to be closed