Fix template to file