Fixup iolog replay and add 'wait' command