better error reporting in test