Clean the template file