Added extra logging for tracing