Update the progress bar during the loop and display the finish message outside of and after the loop.