ENT-648: replace unsafe method in FileTemplateLoader