file: Fix error handling of fread_wrapper().
Refine bytestream reader.