File reading error fix