fix the file readings