Improved cli and error reporting