Incorporate suggestions from review.  Raise io_error for all errors.  Remove error returned from API.