Fixed rare IncompatibleThreadStateException errors when tracing
Traces can be saved and loaded.