send query to debug log if within CLI