add confirmation dialog for cancel/term