Better error handling and error notification