Modified Freemarker output to write to files.