logging and progress bar