Fix leakage
Merge pull request #124 from aldrinleal/fix-file-leaks

Fix leakage