Limit the number of prints when updating the progess bar.
Avoid updating progress bar unless actually changed.