modified ioreplayer.c