Add fn to check CF template validity