add freemarker checks and fix template model that was broken
add freemarker assertions