mark source encoding, fix tracing