Each call to update the progress bar needs to fill the output buffer so that it gets sent immediately.