Added scripts to detect USB device locations, and improved shutdown and startup logic.