Updated generator - correctly finds template files