Added error alert snippet, EOF newlines and switched template extension to 'tmpl'