See the last few posts in this thread by Kristian Schlanbusch. He had the Scheduler engine log path set to a Windows share that was taking some time to get established, and also had the Scheduler in the Startup folder. Thus when it started it failed to create its log file. The failure mode was ugly, unhandled .NET error.
Instead, use the default location (which is right there in the code) for the log, then log the problem in the log, and then pop up a modal error box announcing the problem. Then on closing the error box, immediately open the Configuration window so the user can fix the problem.