public void Start() { if (configOptions != null) { var fileGeneration = new FileGeneration(configOptions); fileGeneration.GenerateXmlFile(); FileTransfer(); } while (isEnabled) { Thread.Sleep(1000); } }