debug: more error reporting