Hopefully this fixes too many open files error
Merge pull request #29 from MarvinT/dev

Hopefully this fixes too many open files error