Added --detect option, perform device detection only