merge template files