improved global error reporting