Instrumented Duo code with debug logging