provide a detailed error if there is a template issue

fix ChicagoBoss/ChicagoBoss#379
Merge pull request #397 from zkessin/master

provide a detailed error if there is a template issue