Handle FileReader errors.
Merge upstream changes