Sigh, people just don't listen to me. If you had made that change to flushrx like I suggested you would automatically get the 'waiting for the prompt' sleep at every point a command is started.

I did listen to you. But I understood more clearly what Mark's change was doing so I tried his version first. Also, as Mark said, I got the impression that your change would happen in more "places" during the process, so I actually did not want to do that (even though that's the very reason why you're saying it would be the better option).

I'm not completely clear on what's going wrong exactly, and I'm not able to reproduce every error, so I wanted to make the changes as small as possible.
_________________________
Tony Fabris