Adding timeout for scan
Add timeout option to abort the scan
improve error message for timeout