public Processor(BackgroundWorker backgroundWorker = null)
        {
            _backgroundWorker = backgroundWorker;
            _windowWriter = GetWindowWriter();
            if (_windowWriter == null)
            {
                RunDeviceSimulator();
                _windowWriter = GetWindowWriter();
            }

            if (_windowWriter == null)
            {
                throw new ArgumentException(string.Format("Cannot find or load Device Simulator. Check that file exists:\n{0}\nHave you installed it?",
                    DeviceSimulatorLocation));
            }
        }
        private static WindowWriter GetWindowWriter()
        {
            WindowWriter windowWriter = null;

            try
            {
                windowWriter = new WindowWriter(DeviceSimulatorWindowName, Settings.Instance.InputTimeoutInMs);
            }
            catch (Exception exception)
            {
                Logger.Debug(exception.Message);
                try
                {
                    windowWriter = new WindowWriter(DeviceSimulatorLocation, Settings.Instance.InputTimeoutInMs);
                }
                catch (Exception exception2)
                {
                    Logger.Debug(exception2.Message);
                }
            }

            return windowWriter;
        }