private void InitializeSynchronizer()
        {
            try
              {
            XmlConfigurator.Configure();

            Session = Application.Session;
            s_logger.Info ("Startup...");

            EnsureSynchronizationContext();

            var applicationDataDirectory = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "CalDavSynchronizer");

            OptionsDataAccess = new OptionsDataAccess (
            Path.Combine (
                applicationDataDirectory,
                GetOrCreateConfigFileName (applicationDataDirectory, Session.CurrentProfileName)
                ));

            var synchronizerFactory = new SynchronizerFactory (
            applicationDataDirectory,
            new TotalProgressFactory (
                new Ui.ProgressFormFactory(),
                int.Parse (ConfigurationManager.AppSettings["loadOperationThresholdForProgressDisplay"]),
                ExceptionHandler.Instance),
            Application.Session);

            Scheduler = new Scheduler (synchronizerFactory);
            Scheduler.SetOptions (OptionsDataAccess.LoadOptions());
              }
              catch (Exception x)
              {
            ExceptionHandler.Instance.LogException (x, s_logger);
            throw;
              }

              s_logger.Info ("Startup finnished");
        }