change filterFiles to processTemplates