static Program()
{
IODirectory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
TaskScheduler.UnobservedTaskException += (sender, args) =>
{
_logger.ErrorFormat("Task unhandled exception: {0}", args.Exception);
args.SetObserved();
};
AppDomain.CurrentDomain.UnhandledException += (sender, args) => _logger.Error($"AppDomain unhandled exception: {args.ExceptionObject}, IsTerminating: {args.IsTerminating}");
}