Hi Hartmut,
you can avoid the SSH (Putty) Close, when you tell Putty that the session should never been closed.
The problem here is that some EWC commands are not uderstood by the CLI parser and then the last exit (of your collection of commands) will close the ssh session. Additionally you can see which command or command group was not accepted !