Beginnings of fixes for IO API changes

It is still very much incorrect in the face of errors, but it's better