private static void WriteFactoryMode(string portName, SmlComServiceClient proxy, Guid clientGuid, bool isOn)
 {
     Console.WriteLine("Setting Factory mode to: " + isOn);
     proxy.WriteEnableFactoryModeK2Enabled(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName), isOn);
     Console.WriteLine();
 }