Added file closing