check for debug flag in templates