diff --git a/tutorial/netstd/Client/Program.cs b/tutorial/netstd/Client/Program.cs
index 857b3e8..eefccf7 100644
--- a/tutorial/netstd/Client/Program.cs
+++ b/tutorial/netstd/Client/Program.cs
@@ -46,10 +46,10 @@
         {
             Logger.LogInformation(@"
 Usage: 
-    Client.exe -help
+    Client -help
         will diplay help information 
 
-    Client.exe -tr:<transport> -bf:<buffering> -pr:<protocol> -mc:<numClients>
+    Client -tr:<transport> -bf:<buffering> -pr:<protocol> -mc:<numClients>
         will run client with specified arguments (tcp transport and binary protocol by default) and with 1 client
 
 Options:
@@ -74,7 +74,7 @@
         <numClients> - number of multiple clients to connect to server (max 100, default 1)
 
 Sample:
-    Client.exe -tr:tcp -p:binary
+    Client -tr:tcp -pr:binary
 ");
         }
 
@@ -83,19 +83,22 @@
             args = args ?? new string[0];
 
             ServiceCollection.AddLogging(logging => ConfigureLogging(logging));
-            Logger = ServiceCollection.BuildServiceProvider().GetService<ILoggerFactory>().CreateLogger(nameof(Client));
-
-            if (args.Any(x => x.StartsWith("-help", StringComparison.OrdinalIgnoreCase)))
+            using (var serviceProvider = ServiceCollection.BuildServiceProvider())
             {
-                DisplayHelp();
-                return;
-            }
+                Logger = serviceProvider.GetService<ILoggerFactory>().CreateLogger(nameof(Client));
 
-            Logger.LogInformation("Starting client...");
+                if (args.Any(x => x.StartsWith("-help", StringComparison.OrdinalIgnoreCase)))
+                {
+                    DisplayHelp();
+                    return;
+                }
 
-            using (var source = new CancellationTokenSource())
-            {
-                RunAsync(args, source.Token).GetAwaiter().GetResult();
+                Logger.LogInformation("Starting client...");
+
+                using (var source = new CancellationTokenSource())
+                {
+                    RunAsync(args, source.Token).GetAwaiter().GetResult();
+                }
             }
         }
 
diff --git a/tutorial/netstd/README.md b/tutorial/netstd/README.md
index 297f4ee..a49fb47 100644
--- a/tutorial/netstd/README.md
+++ b/tutorial/netstd/README.md
@@ -13,13 +13,13 @@
 
 # How to run 
 
-Depending on the platform, the name of the generated executables will vary. On Linux, it is just "client" or "server", on Windows it is "Client.exe" and "Server.exe". In the following, we use the abbreviated form "Client" and "Server".
+Depending on the platform, the name of the generated executables will vary. On Linux, it is just "Client" or "Server", on Windows it is "Client.exe" and "Server.exe". In the following, we use the abbreviated form "Client" and "Server".
 
 - build 
 - go to folder (Client/Server) 
 - run the generated executables: server first, then client from a second console
 
-#Known issues
+# Known issues
 - In trace logging mode you can see some not important internal exceptions
 
 # Running of samples 
@@ -29,10 +29,10 @@
 
 Usage: 
 
-    Server  -h
+    Server -help
         will diplay help information 
 
-    Server  -tr:<transport> -pr:<protocol> 
+    Server -tr:<transport> -pr:<protocol>
         will run server with specified arguments (tcp transport and binary protocol by default)
 
 Options:
@@ -52,7 +52,8 @@
         binary - (default) binary protocol will be used
         compact - compact protocol will be used
         json - json protocol will be used
-		
+        multiplexed - multiplexed protocol will be used
+
 Sample:
 
     Server -tr:tcp
@@ -68,7 +69,7 @@
 
 Usage: 
 
-    Client -h
+    Client -help
         will diplay help information 
 
     Client -tr:<transport> -pr:<protocol> -mc:<numClients>
@@ -91,7 +92,8 @@
         binary - (default) binary protocol will be used
         compact - compact protocol will be used
         json - json protocol will be used
-        
+        multiplexed - multiplexed protocol will be used
+
     -mc (multiple clients):
         <numClients> - number of multiple clients to connect to server (max 100, default 1)
 
@@ -237,16 +239,10 @@
             val = work.Num1 * work.Num2
         elif work.Op == Operation.Divide:
             if work.Num2 == 0:
-                x = InvalidOperation()
-                x.WhatOp = work.Op
-                x.Why = 'Cannot divide by 0'
-                raise x
+                raise InvalidOperation(work.Op, 'Cannot divide by 0')
             val = work.Num1 / work.Num2
         else:
-            x = InvalidOperation()
-            x.WhatOp = work.Op
-            x.Why = 'Invalid operation'
-            raise x
+            raise InvalidOperation(work.Op, 'Invalid operation')
 
         log = SharedStruct()
         log.Key = logid
diff --git a/tutorial/netstd/Server/Program.cs b/tutorial/netstd/Server/Program.cs
index c1e0cb3..3181e8e 100644
--- a/tutorial/netstd/Server/Program.cs
+++ b/tutorial/netstd/Server/Program.cs
@@ -51,26 +51,28 @@
             args = args ?? new string[0];
 
             ServiceCollection.AddLogging(logging => ConfigureLogging(logging));
-            Logger = ServiceCollection.BuildServiceProvider().GetService<ILoggerFactory>().CreateLogger(nameof(Server));             
-
-
-            if (args.Any(x => x.StartsWith("-help", StringComparison.OrdinalIgnoreCase)))
+            using (var serviceProvider = ServiceCollection.BuildServiceProvider())
             {
-                DisplayHelp();
-                return;
+                Logger = serviceProvider.GetService<ILoggerFactory>().CreateLogger(nameof(Server));
+
+                if (args.Any(x => x.StartsWith("-help", StringComparison.OrdinalIgnoreCase)))
+                {
+                    DisplayHelp();
+                    return;
+                }
+
+                using (var source = new CancellationTokenSource())
+                {
+                    RunAsync(args, source.Token).GetAwaiter().GetResult();
+
+                    Logger.LogInformation("Press any key to stop...");
+
+                    Console.ReadLine();
+                    source.Cancel();
+                }
+
+                Logger.LogInformation("Server stopped");
             }
-
-            using (var source = new CancellationTokenSource())
-            {
-                RunAsync(args, source.Token).GetAwaiter().GetResult();
-
-                Logger.LogInformation("Press any key to stop...");
-
-                Console.ReadLine();
-                source.Cancel();
-            }
-
-            Logger.LogInformation("Server stopped");
         }
 
         private static void ConfigureLogging(ILoggingBuilder logging)
@@ -84,10 +86,10 @@
         {
             Logger.LogInformation(@"
 Usage: 
-    Server.exe -help
+    Server -help
         will diplay help information 
 
-    Server.exe -tr:<transport> -bf:<buffering> -pr:<protocol>
+    Server -tr:<transport> -bf:<buffering> -pr:<protocol>
         will run server with specified arguments (tcp transport, no buffering, and binary protocol by default)
 
 Options:
@@ -109,7 +111,7 @@
         multiplexed - multiplexed protocol will be used
 
 Sample:
-    Server.exe -tr:tcp 
+    Server -tr:tcp
 ");
         }
 
diff --git a/tutorial/netstd/build.sh b/tutorial/netstd/build.sh
old mode 100644
new mode 100755
