clear hash when all files are closed