validation OPTIMIZE set log nodes only before an error

Some logging improvements included.
diff --git a/tests/utests/extensions/test_nacm.c b/tests/utests/extensions/test_nacm.c
index 1c999fb..5f7028e 100644
--- a/tests/utests/extensions/test_nacm.c
+++ b/tests/utests/extensions/test_nacm.c
@@ -58,7 +58,7 @@
     assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Ext plugin \"ly2 NACM v1\": "
             "Extension nacm:default-deny-all is allowed only in a data nodes, but it is placed in \"module\" statement.",
-            "/b:{extension='nacm:default-deny-all'}");
+            "Path \"/b:{extension='nacm:default-deny-all'}\".");
 
     /* invalid */
     data = "module aa {yang-version 1.1; namespace urn:tests:extensions:nacm:aa; prefix en;"
@@ -67,7 +67,7 @@
     assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Ext plugin \"ly2 NACM v1\": "
             "Extension nacm:default-deny-write is mixed with nacm:default-deny-all.",
-            "/aa:l/{extension='nacm:default-deny-all'}");
+            "Path \"/aa:l/{extension='nacm:default-deny-all'}\".");
 }
 
 static void
@@ -100,7 +100,7 @@
     assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Ext plugin \"ly2 NACM v1\": "
             "Extension nacm:default-deny-write is not allowed in notification statement.",
-            "/b:notif/{extension='nacm:default-deny-write'}");
+            "Path \"/b:notif/{extension='nacm:default-deny-write'}\".");
 
     /* invalid */
     data = "module aa {yang-version 1.1; namespace urn:tests:extensions:nacm:aa; prefix en;"
@@ -109,7 +109,7 @@
     assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Ext plugin \"ly2 NACM v1\": "
             "Extension nacm:default-deny-write is instantiated multiple times.",
-            "/aa:l/{extension='nacm:default-deny-write'}");
+            "Path \"/aa:l/{extension='nacm:default-deny-write'}\".");
 }
 
 int