Check when messageBox pop up.