Make debug mode configurable