io: fix error message
io: only print an error if there is one