validation OPTIMIZE set log nodes only before an error

Some logging improvements included.
diff --git a/tests/utests/extensions/test_yangdata.c b/tests/utests/extensions/test_yangdata.c
index 89d3231..57caaf2 100644
--- a/tests/utests/extensions/test_yangdata.c
+++ b/tests/utests/extensions/test_yangdata.c
@@ -119,7 +119,7 @@
     assert_null(mod->compiled->exts);
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is ignored since it appears as a non top-level statement in \"container\" statement.",
-            "/b:b/{extension='rc:yang-data'}/template");
+            "Path \"/b:b/{extension='rc:yang-data'}/template\".");
     assert_int_equal(LY_SUCCESS, lys_print_mem(&printed, mod, LYS_OUT_YANG_COMPILED, 0));
     assert_string_equal(printed, info);
     free(printed);
@@ -168,7 +168,7 @@
 
     assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Invalid keyword \"leaf\" as a child of \"rc:yang-data template\" extension instance.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -177,7 +177,7 @@
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated with leaf top level data node (inside a choice), "
             "but only a single container data node is allowed.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -186,7 +186,7 @@
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated with multiple top level data nodes (inside a single choice's case), "
             "but only a single container data node is allowed.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -195,7 +195,7 @@
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated with multiple top level data nodes, "
             "but only a single container data node is allowed.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -204,7 +204,7 @@
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated without any top level data node, "
             "but exactly one container data node is expected.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -220,7 +220,7 @@
     assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated multiple times.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 
     data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"
             "import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
@@ -230,7 +230,7 @@
     CHECK_LOG_CTX("Ext plugin \"ly2 yang-data v1\": "
             "Extension rc:yang-data is instantiated with leaf-list top level data node, "
             "but only a single container data node is allowed.",
-            "/a:{extension='rc:yang-data'}/template");
+            "Path \"/a:{extension='rc:yang-data'}/template\".");
 }
 
 static void