Improved error handling and feedback.