Why is it not showing any messagebox and application is not exiting even though the pipe is wrong.

Could you do only an IF this pipe = "SuperfightersDeluxePipe" then procceed with the rest of the code if not then show a messagebox and application.exit();

using System;
using System.Globalization;
using System.IO;
using System.IO.Pipes;
using System.Net;
using System.Threading;
using System.Windows.Forms;
using SteamworksAPI;

namespace SFD
{
	// Token: 0x0200062A RID: 1578
	internal static partial class Program
	{
		// Token: 0x06005207 RID: 20999
		private static void Main(string[] args)
		{
			ConsoleOutput.Init();
			ServicePointManager.SecurityProtocol |= (SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12);
			Program.IsGame = true;
			string command = "SuperfightersDeluxePipe";
			bool connected = false;
			while (!connected)
			{
				try
				{
					using (NamedPipeClientStream pipeClient = new NamedPipeClientStream(".", command))
					{
						pipeClient.Connect();
						using (StreamWriter writer = new StreamWriter(pipeClient))
						{
							writer.Write(command);
							writer.Flush();
						}
						connected = true;
					}
				}
				catch (Exception ex)
				{
					Console.WriteLine("Error executing pipe command: " + ex.Message);
					throw;
				}
			}
			if (args != null)
			{
				bool flag = false;
				foreach (string text in args)
				{
					if (text == "-server")
					{
						Program.IsServer = true;
						Program.IsGame = false;
					}
					else if (text == "-start")
					{
						Program.AutoStart = true;
					}
					else if (text == "-config")
					{
						flag = true;
					}
					else if (flag)
					{
						Constants.Paths.CustomConfig = text;
						flag = false;
					}
					else if (text == "-totray")
					{
						Program.ToTray = true;
					}
				}
			}
			if (Program.IsServer)
			{
				Application.EnableVisualStyles();
			}
			try
			{
				Application.ThreadException += Program.Application_ThreadException;
				Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
				AppDomain.CurrentDomain.UnhandledException += Program.CurrentDomain_UnhandledException;
			}
			catch
			{
			}
			Constants.Paths.SetupPaths();
			if (Program.IsGame && new ProgramCheck().DoCheck(args))
			{
				return;
			}
			try
			{
				Constants.AppCultureInfo = new CultureInfo("sv-SE");
				Constants.AppUICultureInfo = new CultureInfo("en-US");
				Constants.SetThreadCultureInfo(Thread.CurrentThread);
			}
			catch (Exception exception4)
			{
				Constants.AppCultureInfo = null;
				Program.ShowError(exception4, "Startup Error", false);
				return;
			}
			if (Program.IsGame)
			{
				try
				{
					if (File.Exists("steam_appid.txt"))
					{
						File.Delete("steam_appid.txt");
						Thread.Sleep(250);
					}
				}
				catch (Exception exception5)
				{
					Program.ShowError(exception5, "steam_appid.txt file could not be deleted. Deleted it manually before starting SFD!", true);
					return;
				}
				string text2 = SteamAPILoad.LoadDLL();
				if (!string.IsNullOrEmpty(text2))
				{
					Program.ShowError(new Exception(text2), "LoadDLL failed.", true);
					return;
				}
				if (SteamAPI.RestartAppIfNecessary(855860U))
				{
					return;
				}
				if (!SteamAPI.Init())
				{
					string message = Converter.Base64ToString("U3RlYW1BUElfSW5pdCBmYWlsZWQuDQpNYWtlIHN1cmUgU3RlYW0gaXMgcnVubmluZy4NCkVuc3VyZSB0aGlzIGFwcGxpY2F0aW9uIHJ1bnMgaW4gdGhlIHNhbWUgT1MgdXNlciBjb250ZXh0IGFzIHRoZSBTdGVhbSBjbGllbnQuDQpDaGVjayB0aGF0IFN1cGVyZmlnaHRlcnMgRGVsdXhlIGlzIGluIHlvdXIgU3RlYW0gbGlicmFyeS4=");
					string error = Converter.Base64ToString("U3RlYW1BUElfSW5pdCBmYWlsZWQu");
					Program.ShowError(new Exception(message), error, true);
					return;
				}
			}
			try
			{
				using (GameSFD gameSFD = new GameSFD())
				{
					gameSFD.Run();
				}
			}
			catch (IOException ex2)
			{
				MessageBox.Show(ex2.Message + "\r\nMake sure no other process is using the resource and try again.", "IOException", MessageBoxButtons.OK, MessageBoxIcon.Hand);
			}
			catch (AccessViolationException ex3)
			{
				MessageBox.Show(ex3.Message, "AccessViolationException", MessageBoxButtons.OK, MessageBoxIcon.Hand);
			}
			catch (Exception exception3)
			{
				if (!GameSFD.Closing)
				{
					Program.ShowError(exception3, "Fatal Unhandled Exception", false);
				}
			}
			finally
			{
				if (Program.IsGame)
				{
					SteamAPI.Shutdown();
				}
			}
		}
	}
}