Improve file reading