improved error handling and user feedback