Since you are running this from a UI form, I would use a BackgroundWorker. This allows you to trap an event when the BackgroundWorker ends, and you can tell whether it completed normally, or whether it failed with an exception and if so what exception it received.