Adding close button when got a error