do IO in processInput rather than in process

This is a first step to use the process function for
the ideslave as well.