error reporting at top