Use progressbar to show progress.
Fix misplacing of arguments in on_progress block.