bad error message in case of invalid jpeg in book