probably not needed as the destructor does it but now the file is closed explicitly