Refactored tls in stout. Fixed the issue when tracing OutputTx.