file.append does not work with templates. Here's a demo.