Shouldn't index.delete() be called in onComplete()?

public void onComplete() {
   if (stop) {
     index.delete();
   } else {
     sendAndCheck();
     index.updateTimestamps();
   }
}