copy template into new file