added sys.exit() in error response
added comment to explain string slice in print() of client message