slightly better error reporting