changing permission of the generated template files to 766