change trace.enabled to atomic boolean