Only call show_progress() and end_progress() if do_progress is set.