Abort check inside expensive loop