Update and rename template file