modify iohandler and pipe