added checks for canceling dialog as well as stopping asynctask if user
cancels task