* add 'generate' option for templates
* better logging