diff --git a/tools/dhtcnode.c b/tools/dhtcnode.c
index b3c5603991eeccc957b7b250a04e3a44e8b443bf..cdb04714435d23b4c026667ca7bf20b94aa9b216 100644
--- a/tools/dhtcnode.c
+++ b/tools/dhtcnode.c
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdatomic.h>
+#include <inttypes.h>
 
 #include <getopt.h>
 #include <readline/readline.h>
@@ -38,6 +39,10 @@ struct listen_context {
     dht_op_token* token;
     size_t count;
 };
+struct put_context {
+    dht_runner* runner;
+    dht_value* value;
+};
 
 bool dht_value_callback(const dht_value* value, bool expired, void* user_data)
 {
@@ -67,8 +72,10 @@ void dht_get_done_callback(bool ok, void* user_data)
 
 void dht_put_done_callback(bool ok, void* user_data)
 {
-    dht_runner* runner = (dht_runner*)user_data;
-    printf("Put completed: %s\n", ok ? "success !" : "failure :-(");
+    struct put_context* ctx = (struct put_context*)user_data;
+    printf("Put completed (id: %" PRIx64 "): %s\n", dht_value_get_id(ctx->value), ok ? "success !" : "failure :-(");
+    dht_value_unref(ctx->value);
+    free(ctx);
 }
 
 void dht_shutdown_callback(void* user_data)
@@ -261,8 +268,10 @@ int main(int argc, char **argv)
         else if (!strcmp(cmd, "p")) {
             key = parse_key(arg);
             dht_value* val = dht_value_new_from_string(value);
-            dht_runner_put(runner, &key, val, dht_put_done_callback, runner, true);
-            dht_value_unref(val);
+            struct put_context* ctx = malloc(sizeof(struct put_context));
+            ctx->runner = runner;
+            ctx->value = val;
+            dht_runner_put(runner, &key, val, dht_put_done_callback, ctx, true);
         }
         else {
             printf("Unknown command: %s\n", cmd);