Scan in a separate thread