Improved logging.
Fix message_name error in get_client_message().
Fix error with call to encode in send_client_message().