Fix file unclosed bug.