file reading fix