Ensure file handle is closed using with statement
Merged svisser's changes
Merge branch 'svisser-patch-1'