private void bw_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker loadWorker = sender as BackgroundWorker; index = new InvertedIndex(); logic = new Expressions(index, persistentFileName); logEntries = new LogEntries(logFilename, index, ProgressUpdate); if (logEntries!=null) { logEntries.Build(); } }