template files

- fixed bugs in rake task