fixed file closing issue