provide a detailed error if there is a template issue

fix ChicagoBoss/ChicagoBoss#379