First steps at better error reporting