implement creating files based on templates