Improve error handling and client side console messages