Added debug flags to template files