diff --git a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
index 93f230a..6a811ea 100644
--- a/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
+++ b/sdnr/wt/netconfnode-state-service/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/impl/GenericTransactionUtils.java
@@ -92,7 +92,7 @@
 
         int retry = 0;
         int retryDelayMilliseconds = 2000;
-        int maxRetries = 5; // 0 no Retry
+        int maxRetries = 0; // 0 no Retry
 
         do {
             if (retry > 0) {
@@ -107,8 +107,8 @@
 
             LOG.debug("Sending message with retry {} ", retry);
             statusIndicator.set("Create Read Transaction");
-
-            try (ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();) {
+            ReadTransaction readTransaction = dataBroker.newReadOnlyTransaction();
+            try {
                 @NonNull FluentFuture<Optional<T>> od = readTransaction.read(dataStoreType, iid);
                 statusIndicator.set("Read done");
                 if (od != null) {
@@ -119,19 +119,24 @@
                         data = optionalData.orElse(null);
                         statusIndicator.set("Read transaction done");
                         noErrorIndication.set(true);
+                    } else {
+                        statusIndicator.set("optional Data is null");
                     }
+                } else {
+                    statusIndicator.set("od feature is null");
                 }
-
-                readTransaction.close();
             } catch (CancellationException | ExecutionException | InterruptedException | NoSuchElementException e) {
                 statusIndicator.set(StackTrace.toString(e));
                 if (e instanceof InterruptedException) {
                     Thread.currentThread().interrupt();
                 }
+                LOG.debug("Exception during read", e);
             }
 
         } while (noErrorIndication.get() == false && retry++ < maxRetries);
 
+        LOG.debug("stage 2 noErrorIndication {} status text {}", noErrorIndication.get(), statusIndicator.get());
+
         return data;
     }
 
