bugfix: close forgotten file descriptors
Merge pull request #1 from cacilhas/master

bugfix: close forgotten file descriptors