improves error reporting