close the open file descriptor
Merge pull request #743 from mykmelez/close-fd

close the open file descriptor