xpath FEATURE improve not-found node message
diff --git a/src/xpath.c b/src/xpath.c
index 7c3eb59..1fd0e9d 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -7171,8 +7171,8 @@
             }
             if (i == -1) {
                 path = lysc_path(set->cur_scnode, LYSC_PATH_LOG, NULL, 0);
-                LOGWRN(set->ctx, "Schema node \"%.*s\" not found (%.*s) with context node \"%s\".",
-                        ncname_len, ncname, ncname - exp->expr, exp->expr, path);
+                LOGWRN(set->ctx, "Schema node \"%.*s\" not found (\"%.*s\") with context node \"%s\".",
+                        ncname_len, ncname, (ncname - exp->expr) + ncname_len, exp->expr, path);
                 free(path);
             }
         } else {
diff --git a/tests/utests/schema/test_schema_common.c b/tests/utests/schema/test_schema_common.c
index 677a515..dabf106 100644
--- a/tests/utests/schema/test_schema_common.c
+++ b/tests/utests/schema/test_schema_common.c
@@ -389,7 +389,7 @@
             "}"
         "}";
     assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (../../cont/) with context node \"/b:cont2/l2\".");
+    logbuf_assert("Schema node \"l\" not found (\"../../cont/l\") with context node \"/b:cont2/l2\".");
     logbuf_clean();
 
     /* state -> config */
@@ -549,7 +549,7 @@
             "}"
         "}";
     assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (../) with context node \"/h:rp/l2\".");
+    logbuf_assert("Schema node \"l\" not found (\"../l\") with context node \"/h:rp/l2\".");
     logbuf_clean();
 
     /* rpc input -> notif leafref */
@@ -596,7 +596,7 @@
             "}"
         "}";
     assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (/notif/) with context node \"/i:rp/l2\".");
+    logbuf_assert("Schema node \"l\" not found (\"/notif/l\") with context node \"/i:rp/l2\".");
     logbuf_clean();
 
     /* action output -> state */
@@ -693,7 +693,7 @@
             "}"
         "}";
     assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (/cont/ll/act/) with context node \"/k:cont/ll/act/l2\".");
+    logbuf_assert("Schema node \"l\" not found (\"/cont/ll/act/l\") with context node \"/k:cont/ll/act/l2\".");
     logbuf_clean();
 
     *state = NULL;