Improve error message when read fails.