Fixed issue with file reading