Fix bug when handling input/output errors. Now updates the l_file_to_location table's rows when possible.