Avoid undefined method next exceptions

by making sure all methods are correctly defined on the io object