Propagate IOException in case of errors.