Add condition to stop issuing io in do_io().