Add error msg when template is malformed
Ready for v2.0