rename template files before expansion to prevent overwrite