fixed two dialogs if file cannot be saved