Simplified error handling in _update_file().
There's really no point in closing the file and continue. Code following the _update_file() call assumes the file is open.