Declare printListOfDevices before main