io: assert errors before asserting content in I/O test