libtt's tracing fails gracefully if the variable's value is corrupt or inconsistent.
int tt_trace_control(int option)
where option 0 to turn tracing off; 1 to turn tracing on; and -1 to toggle tracing on and off. When tracing is on, the extent of tracing is controlled by the TT_TRACE_SCRIPT variable or tracefile. This call returns the previous setting of the trace flag.