Device Scan: Improve error checking and add cancel