Fixed bug in detect command error handling.
Fixed bug in detect command error handling.

The bug was discovered when looking into issue #160.
HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper