Improve error messages
Improve error handling