Change trace to throwing exception