Added template_file method to create file from a template