Merge pull request #273 from teharrison/master

fix file handle bug
Merge pull request #5 from teharrison/master

Merge pull request #273 from teharrison/master