Fix file not truncated.