add debug mode trigger in route.py