[CHANGE] Only allow query tracing while on DEBUG mode