added error handling to CS trade client