Error handling
Improve progress bar and error handling