added progress bar to debug mode