Fix file read incomplete problem