made error page use template