adding more error reporting