file: Fix error handling of fread_wrapper().