Fixed device selection for command line version. Added alert window.