Fixes file handle closing on file reading

Forgotten to close the handle in windows implementation.