in reply to sleep problem !
Your standard output needs to be unbuffered.
Add this line before your loop:
$|++; [download]
And you should get what you want.
See Suffering from buffering (off site) for a thorough explanation.