better error messages for templates that don't render right