improve error handling
Error reporting