Made scanThread interruptible in preparation for cancel functionality