Add some error checking for read_io.

This fixes a crash for me. 

Can we assume read_io reports errors, if necessary?