final changes on logger and trim the received text from the server