update template file