better error reporting in console