dealing with progress bar and logging