you should call the progress bar in your fn() function.
Show your fn() fucntion code.