a little bit better error reporting