Move error template to separate file