Add a progress bar for copy operations
Fix a minor bug when copying