public static async Task Main() { var fileWorker = new FileWorker(); var baseAddress = await fileWorker.DeserializeAsync <BaseAddress>(_path); if (baseAddress == null || string.IsNullOrEmpty(baseAddress.BaseUrl)) { Console.WriteLine("Something going wrong with file!"); return; } _client = new HttpClient() { BaseAddress = new Uri(baseAddress.BaseUrl) }; _session = new Session(); try { await new AuthorizationMenu(_client, _session).Start(); } catch (AggregateException) { Console.WriteLine("\n\nERROR:\tCheck your internet connection and run game again!\n"); } }