[TASK] Don't validate templates unless debug mode is on