handling dropped connections by server gracefully
adding support for script command line args and client fixes