fix unclosed files

windows doesn't like them