Fix file closing issue.