Fix file chunk loss handling