error tracing added