replaced the toast with a DialogFragment that allows user to cancel operation