diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
index c5f7330..42caf36 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiCallNode.java
@@ -90,11 +90,6 @@
     private static final Logger log = LoggerFactory.getLogger(
             RestconfApiCallNode.class);
 
-    /**
-     * Creates an instance of restconf api call node.
-     */
-    public RestconfApiCallNode() {
-    }
 
     /**
      * Sends the restconf request using the parameters map and the memory
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
index e066671..0f9c940 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfapicall/RestconfApiUtils.java
@@ -200,13 +200,17 @@
         if (dir.exists()) {
             File[] files = dir.listFiles();
             if (files != null) {
-                for (File file : files) {
-                    if (file.isFile() && file.getName().endsWith(YANG)) {
-                        yangFiles.add(file);
-                    } else if (file.isDirectory()) {
-                        getYangFiles(file, yangFiles);
-                    }
-                }
+                processFiles(files, yangFiles);
+            }
+        }
+    }
+
+    private static void processFiles(File[] files, List<File> yangFiles) {
+        for (File file : files) {
+            if (file.isFile() && file.getName().endsWith(YANG)) {
+                yangFiles.add(file);
+            } else if (file.isDirectory()) {
+                getYangFiles(file, yangFiles);
             }
         }
     }
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java
index 155656e..a76554d 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventHandler.java
@@ -40,11 +40,7 @@
     public void onEvent(InboundEvent event) {
         String payload = event.readData();
         if (!node.eventQueue().offer(payload)) {
-            log.error("Unable to process event "
-                              + payload + "as processing queue is full");
-            throw new RuntimeException("Unable to process event "
-                                               + payload
-                                               + "as processing queue is full");
+            log.error("Unable to process event {} as processing queue is full", payload);
         }
     }
 }
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
index a85876c..aae8081 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/EventProcessor.java
@@ -53,17 +53,22 @@
                 String id = param.get(EVENT_SUBSCRIPTION_ID);
                 SubscriptionInfo info = node.subscriptionInfoMap().get(id);
                 if (info != null) {
-                    SvcLogicContext ctx = new SvcLogicContext();
-                    for (Map.Entry<String, String> entry : param.entrySet()) {
-                        ctx.setAttribute(entry.getKey(), entry.getValue());
-                    }
+                    SvcLogicContext ctx = setContext(param);
                     SvcLogicGraphInfo callbackDG = info.callBackDG();
                     callbackDG.executeGraph(ctx);
                 }
             } catch (InterruptedException | SvcLogicException e) {
-                log.error(e.getMessage());
-                throw new RuntimeException(e.getMessage());
+                log.error("Interrupted!", e);
+                Thread.currentThread().interrupt();
             }
         }
     }
+
+    private SvcLogicContext setContext(Map<String, String> param) {
+        SvcLogicContext ctx = new SvcLogicContext();
+        for (Map.Entry<String, String> entry : param.entrySet()) {
+            ctx.setAttribute(entry.getKey(), entry.getValue());
+        }
+        return ctx;
+    }
 }
diff --git a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
index 0490b3a..f5366a5 100644
--- a/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
+++ b/restconf-client/provider/src/main/java/org/onap/ccsdk/sli/plugins/restconfdiscovery/RestconfDiscoveryNode.java
@@ -85,7 +85,7 @@
 
             establishPersistentConnection(paramMap, ctx, subscriberId);
         } else {
-            log.info("Failed to subscribe " + subscriberId);
+            log.info("Failed to subscribe {}", subscriberId);
             throw new SvcLogicException(ctx.getAttribute(RESPONSE_CODE));
         }
     }
@@ -131,7 +131,8 @@
                 try {
                     Thread.sleep(5000);
                 } catch (InterruptedException e) {
-                    log.error("Exception: " + e.getMessage());
+                    log.error("Interrupted!", e);
+                    Thread.currentThread().interrupt();
                 }
             }
             eventSource.close();
