Add compiledTemplatesFile option and fix tests