Handle errors when failing to rewind() file pointers