Fix file reading