base64 encoding for memcached_broker, some error handling