Added progress bar and control of the console output