handle some error situation in the trace file