Some more templating
More explicit error message