better error handling reporting