diff --git a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/compute.ftl b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/compute.ftl
index 3dc85cf..748f4da 100644
--- a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/compute.ftl
+++ b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/compute.ftl
@@ -40,12 +40,12 @@
         "memoryRAM": {
           "type": "string",
           "enum": [
-            "1",
-            "2",
-            "4",
-            "8"
+            "1 GB",
+            "2 GB",
+            "4 GB",
+            "8 GB"
           ],
-          "default": "1"
+          "default": "1 GB"
         }
       },
       "additionalProperties": false
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java
index c8037ce..86faf15 100644
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java
+++ b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java
@@ -77,13 +77,10 @@
     info.setDescription(entitlementPool.getDescription());
     info.addProperty("thresholdValue", entitlementPool.getThresholdValue());
     info.addProperty("threshold_unit", entitlementPool.getThresholdUnit());
-    info.addProperty("entitlement_metric", entitlementPool.getEntitlementMetric());
+    //info.addProperty("entitlement_metric", entitlementPool.getEntitlementMetric());
     info.addProperty("increments", entitlementPool.getIncrements());
-    info.addProperty("aggregation_func", entitlementPool.getAggregationFunction());
     info.addProperty("operational_scope", entitlementPool.getOperationalScope());
-    info.addProperty("EntitlementTime", entitlementPool.getTime());
-    info.addProperty("manufacturerReferenceNumber",
-        entitlementPool.getManufacturerReferenceNumber());
+
     return info;
   }
 
diff --git a/openecomp-be/tools/migration/cassandra2zusammen.sh b/openecomp-be/tools/migration/cassandra2zusammen.sh
index 6ef90ad..99853b8 100644
--- a/openecomp-be/tools/migration/cassandra2zusammen.sh
+++ b/openecomp-be/tools/migration/cassandra2zusammen.sh
@@ -9,7 +9,6 @@
 
 
 # change exist package and service templates in db
-java -Dlog.home=/apps/jetty/base/be/logs -Dconfiguration.yaml=/apps/jetty/base/be/config/catalog-be/configuration.yaml  -jar openecomp-zusammen-migration-1.0-SNAPSHOT.jar org.openecomp.core.migration.MigrationMain
-
-STATUS="${?}"
-echo "${STATUS}"
+## Code removed but script is kept for future hook use ##
+##STATUS="${?}"
+##echo "${STATUS}"
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java
index b92ba52..685f70d 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java
@@ -18,6 +18,10 @@
 import java.nio.file.Paths;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
 import static java.nio.file.Files.createDirectories;
 public class ExportDataCommand {
@@ -25,6 +29,8 @@
 
     public static void exportData(SessionContext context, String filterItem) {
         try {
+            Set<String> filteredItem = new HashSet<>();
+            filteredItem.add(filterItem);
             ImportProperties.initParams();
             CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
             Path rootDir = Paths.get(ImportProperties.ROOT_DIRECTORY);
@@ -32,10 +38,10 @@
             if (filterItem != null) {
                 filterItem = filterItem.replaceAll("\\r", "");
             }
-            new ItemHandler().createItemsData(context, filterItem);
-            new VersionHandler().loadVersions(filterItem);
-            new ElementHandler().loadElements(filterItem);
-            zipPath(rootDir,filterItem);
+            new ItemHandler().createItemsData(context, filteredItem);
+            new VersionHandler().loadVersions(filteredItem);
+            new ElementHandler().loadElements(filteredItem);
+            zipPath(rootDir,filteredItem);
             FileUtils.forceDelete(rootDir.toFile());
         } catch (Exception ex) {
             logger.error(ex.getMessage(), ex);
@@ -43,12 +49,14 @@
         }
 
     }
-    private static void zipPath(Path rootDir,String filterItem ) throws Exception{
+    private static void zipPath(Path rootDir,Set<String> filterItem ) throws Exception{
         LocalDateTime date = LocalDateTime.now();
         DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
         String dateStr = date.format(formatter);
         String zipFile = System.getProperty("user.home")+ File.separatorChar+"onboarding_import"+ dateStr + ".zip";
         ZipUtils.createZip(zipFile, rootDir,filterItem);
+        logger.info("Exported file :" + zipFile);
+        System.out.println("Exported file :" + zipFile);
     }
 
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java
index ebce90f..49eaaea 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java
@@ -10,6 +10,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Objects;
+import java.util.Set;
 
 import static java.io.File.separator;
 import static java.nio.file.Files.*;
@@ -22,15 +23,16 @@
     public ElementHandler() {
     }
 
-    public void loadElements(String filteredItem) {
+    public void loadElements(Set<String> filteredItem) {
         ElementCassandraLoader elementCassandraLoader = new ElementCassandraLoader();
-        elementCassandraLoader.list().forEach(elementEntity ->  handleElementEntity(elementEntity,filteredItem));
+          elementCassandraLoader.list().forEach(elementEntity ->  handleElementEntity(elementEntity,filteredItem));
     }
 
-    private void handleElementEntity(ElementEntity elementEntity, String filteredItem) {
+    private void handleElementEntity(ElementEntity elementEntity, Set<String> filteredItem) {
         try {
             String itemId = elementEntity.getItemId();
-            if (filteredItem != null && !itemId.contains(filteredItem)){
+
+            if (!filteredItem.isEmpty() && !filteredItem.contains(itemId)){
                 return;
             }
             String versionId = elementEntity.getVersionId();
@@ -42,11 +44,18 @@
             if (!isNull(namespace)){
                 namespacePath =  namespace.replace(ELEMENT_NAMESPACE_SPLITTER,separator)+separator;
             }
-            Path elementDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
-                    + separator + versionId + separator + space + separator + namespacePath+ separator + elementId);
+            Path elementDirectoryPath;
+            if (!isNull(namespace)){
+                elementDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
+                        + separator + versionId + separator + space + separator + namespacePath+ separator + elementId);
+            } else {
+                elementDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
+                        + separator + versionId + separator + space + separator + elementId);
+              }
+
             if (notExists(elementDirectoryPath)) {
-                createDirectories(elementDirectoryPath);
-            }
+                 Path created = createDirectories(elementDirectoryPath);
+             }
 
             String info = elementEntity.getInfo();
             if (!isNull(info)) {
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java
index 9eea182..710b731 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java
@@ -1,9 +1,11 @@
 package org.openecomp.core.tools.Commands.exportdata;
 
+import com.amdocs.zusammen.datatypes.Id;
 import com.amdocs.zusammen.datatypes.SessionContext;
 import com.amdocs.zusammen.datatypes.item.Item;
 import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDao;
 import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDaoFactory;
+import com.google.common.base.Strings;
 import org.openecomp.core.tools.Commands.ExportDataCommand;
 import org.openecomp.core.utilities.json.JsonUtil;
 import org.openecomp.sdc.logging.api.Logger;
@@ -13,11 +15,14 @@
 import java.net.URISyntaxException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Optional;
+import java.util.Set;
 
-import static java.nio.file.Files.*;
 import static java.io.File.separator;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.*;
+import static java.nio.file.Files.*;
+import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.JSON_POSTFIX;
 
 public class ItemHandler {
     private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
@@ -27,21 +32,42 @@
         ImportProperties.initParams();
     }
 
-    public void createItemsData(SessionContext context, String filteredItem) throws URISyntaxException, IOException {
+    public void createItemsData(SessionContext context, Set<String> filteredItem) throws URISyntaxException, IOException {
+        final List<Item> items = new ArrayList<>();
+        if (filteredItem.isEmpty()) {
+            items.addAll(getItemDao(context).list(context));
+        } else {
+            Optional<Item> item = addItem(context, filteredItem.iterator().next(), items);
+            item.ifPresent(foundedItem -> {
+                Object vendorId =  foundedItem.getInfo().getProperty("vendorId");
+                if (vendorId != null) {
+                    String vendorIdStr = vendorId.toString();
+                    addItem(context, vendorIdStr, items);
+                    filteredItem.add(vendorIdStr);
+                }
+            });
+        }
 
-        List<Item> items = getItemDao(context).list(context);
-        items.parallelStream().forEach(item -> createItemDirectoryAndFiles(item,filteredItem));
+        items.parallelStream().forEach(item -> createItemDirectoryAndFiles(item, filteredItem));
 
     }
 
-    private final void createItemDirectoryAndFiles(Item item,String filteredItem) {
+
+
+    private Optional<Item> addItem(SessionContext context, String filteredItem, List<Item> items) {
+        Optional<Item> item = getItemDao(context).get(context, new Id(filteredItem));
+        item.ifPresent(itemData -> items.add(itemData));
+        return item;
+    }
+
+    private final void createItemDirectoryAndFiles(Item item, Set<String> filteredItem) {
         try {
             String itemId = item.getId().getValue();
-            if (filteredItem != null && !itemId.contains(filteredItem)){
+            if (!filteredItem.isEmpty() && !filteredItem.contains(itemId)) {
                 return;
             }
-            Path itemPath = Paths.get( ImportProperties.ROOT_DIRECTORY + separator + itemId);
-            Path itemFilePath = Paths.get( ImportProperties.ROOT_DIRECTORY + separator +
+            Path itemPath = Paths.get(ImportProperties.ROOT_DIRECTORY + separator + itemId);
+            Path itemFilePath = Paths.get(ImportProperties.ROOT_DIRECTORY + separator +
                     itemId + separator + itemId + JSON_POSTFIX);
             if (notExists(itemPath)) {
                 createDirectories(itemPath);
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java
index b8d8295..e8e703b 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java
@@ -17,6 +17,7 @@
 
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Set;
 
 public class VersionHandler {
     private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
@@ -24,17 +25,17 @@
     public VersionHandler() {
     }
 
-    public void loadVersions(String filteredItem) {
+    public void loadVersions(Set<String> filteredItem) {
         VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
         versionCassandraLoader.list().forEach(versionEntity -> handleVersionEntity(versionEntity,filteredItem));
         VersionInfoCassandraLoader versionInfoCassandraLoader = new VersionInfoCassandraLoader();
         versionInfoCassandraLoader.list().forEach(versionInfoEntity ->  handleVersionInfo(versionInfoEntity,filteredItem));
     }
 
-    private void handleVersionEntity(VersionEntity versionEntity, String filteredItem) {
+    private void handleVersionEntity(VersionEntity versionEntity, Set<String> filteredItem) {
         try {
             String itemId = versionEntity.getItemId();
-            if (filteredItem != null && !itemId.contains(filteredItem)){
+            if (!filteredItem.isEmpty()  && !filteredItem.contains(itemId)){
                 return;
             }
             String versionId = versionEntity.getVersionId();
@@ -55,7 +56,7 @@
 
     }
 
-    private void handleVersionInfo(VersionInfoEntity versionInfoEntity, String filteredItem) {
+    private void handleVersionInfo(VersionInfoEntity versionInfoEntity, Set<String> filteredItem) {
         try {
             String itemId = versionInfoEntity.getEntityId();
             Path itemDirectory = Paths.get( ROOT_DIRECTORY + separator + itemId);
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java
index 7ba8309..d51458a 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java
@@ -1,5 +1,6 @@
 package org.openecomp.core.tools.Commands.importdata;
 
+import com.amdocs.zusammen.datatypes.Id;
 import com.amdocs.zusammen.datatypes.SessionContext;
 import org.openecomp.core.tools.store.ElementCassandraLoader;
 import org.openecomp.core.tools.store.ElementNamespaceHandler;
@@ -15,21 +16,26 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import static java.io.File.separator;
 import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.*;
 
 public class ElementImport {
     private static final Logger logger = LoggerFactory.getLogger(ElementImport.class);
+    public static final String ROOT_ITEM = Id.ZERO.getValue();
+
     private ElementCassandraLoader elementCassandraLoader = new ElementCassandraLoader();
     private ElementNamespaceHandler cassandraElementRepository = new ElementNamespaceHandler();
     private VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
 
-    public void loadPath(SessionContext sessionContext, Path elementDir, String elementId, String[] pathObjects) {
+    public void loadPath(SessionContext sessionContext, Path elementDir, String elementId, String[]
+            pathObjects) {
         try {
+            if (!Files.isDirectory(elementDir)){
+                return;
+            }
             // load info file
             ElementEntity elementEntity = new ElementEntity();
             Path infoFilePath = Paths.get(elementDir.toString() + separator + ELEMENT_INFO_PREFIX
@@ -38,7 +44,6 @@
                 String info = new String(Files.readAllBytes(infoFilePath));
                 elementEntity.setInfo(info);
             }
-
             // load relation file
             Path realtionsFilePath = Paths.get(elementDir.toString() + separator
                     + ELEMENT_RELATION_PREFIX + elementId + JSON_POSTFIX);
@@ -58,7 +63,7 @@
 
             //load visualization
             Path visualFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_VISUALIZATION_PREFIX + elementId );
+                    + ELEMENT_VISUALIZATION_PREFIX + elementId);
             if (Files.exists(visualFilePath)) {
                 byte[] bytes = Files.readAllBytes(visualFilePath);
                 ByteBuffer visualization = ByteBuffer.wrap(bytes);
@@ -67,45 +72,60 @@
 
             //load searchable
             Path searchableFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_SEARCHABLE_PREFIX + elementId );
+                    + ELEMENT_SEARCHABLE_PREFIX + elementId);
             if (Files.exists(searchableFilePath)) {
                 byte[] bytes = Files.readAllBytes(searchableFilePath);
                 ByteBuffer searchable = ByteBuffer.wrap(bytes);
                 elementEntity.setSearchableData(searchable);
             }
-
+            String element_Id = pathObjects[pathObjects.length - 1];
             elementEntity.setSpace(pathObjects[2]);
             elementEntity.setItemId(pathObjects[0]);
             elementEntity.setVersionId(pathObjects[1]);
-            elementEntity.setElement_id(pathObjects[pathObjects.length - 1]);
+            elementEntity.setElement_id(element_Id);
             elementEntity.setNamespace(getNameSpace(pathObjects));
             elementEntity.setParentId(getParentId(pathObjects));
-            elementEntity.setSubElementIds(getAllSubElementsIds(elementDir));
+            elementEntity.setSubElementIds(getAllSubElementsIds(elementDir, element_Id));
             elementCassandraLoader.createEntity(elementEntity);
             cassandraElementRepository.createElementNamespace(elementEntity);
             versionCassandraLoader.insertElementToVersion(elementEntity);
         } catch (Exception ex) {
             logger.error(ex.getMessage(), ex);
+            ex.printStackTrace();
         }
     }
 
     private String getParentId(String[] pathObjects) {
-        if (pathObjects.length <= 4) {
+
+        if (pathObjects[pathObjects.length - 1].equals(ROOT_ITEM)) {
             return null;
         }
+        if (pathObjects.length == 4) {
+            return ROOT_ITEM;
+        }
         return pathObjects[pathObjects.length - 2];
     }
 
-    private Set<String> getAllSubElementsIds(Path root) throws IOException {
-        try (Stream<Path> walk = Files.walk(root)) {
-           return  walk.filter(path -> Files.isDirectory(path))
-                   .map(path -> path.toFile().getName() ).collect(Collectors.toSet());
+    private Set<String> getAllSubElementsIds(Path root, String elementId) throws IOException {
+        if (elementId.equals(ROOT_ITEM)) {
+            root = root.getParent();
         }
+        File file = root.toFile();
+        Set<String> retVal = new HashSet<>();
+        File[] files = file.listFiles();
+        for (File f : files){
+            if (f.isDirectory()){
+                retVal.add(f.getName());
+            }
+        }
+        retVal.remove(ROOT_ITEM);
+        return retVal;
+
     }
 
     private String getNameSpace(String[] pathObjects) {
         if (pathObjects.length <= 4) {
-            return null;
+            return "";
         }
         if (pathObjects.length == 5) {
             return pathObjects[3];
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java
index c704274..9ec5d63 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java
@@ -31,8 +31,11 @@
             Item item = JsonUtil.json2Object(itemJson, Item.class);
             ItemDao itemDao = getItemDao(sessionContext);
             itemDao.create(sessionContext, item.getId(), item.getInfo(), item.getCreationTime());
+            logger.info("Item Created :"+item.getInfo().getName()+" , "+item.getId());
+            System.out.println("Item Created :"+item.getInfo().getName()+" , "+item.getId());
         } catch (Exception ex) {
             logger.error(ex.getMessage(), ex);
+            ex.printStackTrace();
         }
     }
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java
index 020b2f3..15f8b02 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java
@@ -4,10 +4,14 @@
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
 
+import javax.validation.constraints.Min;
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 import java.util.stream.Stream;
 
 public class TreeWalker {
@@ -21,7 +25,10 @@
     }
 
     private static final void handlePath(SessionContext sessionContext, Path path, Path root,String filterItem) {
-        String logicalPath = path.toString().replace(root.toString()+File.separator, "");
+        String logicalPath = path.toString().replace(root.toString(), "");
+        if (logicalPath.startsWith(File.separator)){
+            logicalPath = logicalPath.substring(1);
+        }
         String[] splitted = logicalPath.split(File.separator);
         if(filterItem != null && splitted.length > 0 && !splitted[0].contains(filterItem)){
             return;
@@ -42,7 +49,7 @@
                 break;
             default:
                 //handle elements
-                new ElementImport().loadPath(sessionContext,path,splitted[splitted.length -1],splitted);
+                 new ElementImport().loadPath(sessionContext,path,splitted[splitted.length -1],splitted);
                 break;
         }
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
index 6447f85..2f6693d 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
@@ -10,12 +10,14 @@
 import java.nio.file.Path;
 import java.util.Objects;
 import java.util.Scanner;
+import java.util.Set;
+import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import java.util.zip.ZipOutputStream;
 
 public class ZipUtils {
-    public static void createZip(String zipFileName, Path dir, String filterItem) throws Exception {
+    public static void createZip(String zipFileName, Path dir, Set<String> filterItem) throws Exception {
         File dirObj = dir.toFile();
         try (
                 FileOutputStream fileOutputStream = new FileOutputStream(zipFileName);
@@ -24,29 +26,34 @@
         }
     }
 
-    public static final String cleanStr(String inFilterStr) {
-        if (Objects.isNull(inFilterStr)) {
-            return inFilterStr;
-        }
-        Scanner scan = new Scanner(inFilterStr);
-        while (scan.hasNextLine()) {
-            inFilterStr = scan.nextLine().replaceAll("[^a-zA-Z0-9]", "");
-        }
-        return inFilterStr;
+    public static final Set<String> cleanStr(Set<String> inFilterStrs) {
+        return inFilterStrs.stream().map(inFilterStr -> {
+                    if (Objects.isNull(inFilterStr)) {
+                        return inFilterStr;
+                    }
+                    Scanner scan = new Scanner(inFilterStr);
+                    while (scan.hasNextLine()) {
+                        inFilterStr = scan.nextLine().replaceAll("[^a-zA-Z0-9]", "");
+                    }
+                    return inFilterStr;
+                }
+        ).collect(Collectors.toSet());
     }
 
-    static void addDir(File dirObj, ZipOutputStream out, String root, String filterItem) throws IOException {
+    static void addDir(File dirObj, ZipOutputStream out, String root, Set<String> filterItem) throws IOException {
         File[] files = dirObj.listFiles();
         filterItem = cleanStr(filterItem);
 
         for (int i = 0; i < files.length; i++) {
             if (files[i].isDirectory()) {
                 addDir(files[i], out, root, filterItem);
+                String filePath = files[i].getAbsolutePath().replace(root + File.separator, "") + "/";
+                out.putNextEntry(new ZipEntry(filePath));
                 continue;
             }
             try (FileInputStream in = new FileInputStream((files[i].getAbsolutePath()))) {
                 String filePath = files[i].getAbsolutePath().replace(root + File.separator, "");
-                if (filterItem == null || filePath.contains(filterItem)) {
+                if (filterItem.isEmpty() || filterItem.stream().anyMatch(s -> filePath.contains(s))) {
                     out.putNextEntry(new ZipEntry(filePath));
                     try {
                         ByteStreams.copy(in, out);
@@ -74,9 +81,16 @@
             while (ze != null) {
                 String fileName = ze.getName();
                 File newFile = new File(outputFolder.toString() + File.separator + fileName);
-                new File(newFile.getParent()).mkdirs();
-                try (FileOutputStream fos = new FileOutputStream(newFile)) {
-                    ByteStreams.copy(zis, fos);
+                if (ze.isDirectory()) {
+                    Path path = newFile.toPath();
+                    if (!Files.exists(path)) {
+                        Files.createDirectories(path);
+                    }
+                } else {
+                    new File(newFile.getParent()).mkdirs();
+                    try (FileOutputStream fos = new FileOutputStream(newFile)) {
+                        ByteStreams.copy(zis, fos);
+                    }
                 }
                 ze = zis.getNextEntry();
             }
diff --git a/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml b/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
index b1c1335..a13dc82 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
+++ b/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
@@ -1,282 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="5 seconds">
+<configuration>
 
-    <property scope="system" name="ECOMP-component-name" value="ASDC" />
-    <property scope="system" name="ECOMP-subcomponent-name" value="ASDC-BE" />
-    <property file="${config.home}/catalog-be/configuration.yaml" />
-    <property scope="context" name="enable-all-log" value="false" />
-
-    <!--statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
-    <include resource="asdc_debug_logback.xml"/-->
-
-    <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)-->
-    <!--timestamp(m)| requestID(m)| serviceInstanceID(o)| threadID(m)| physicalServerName(o)| serviceName(m)| userID(m)| logLevel(m)| severity(o)| serverIpAddress(m)| serverName(m)| clientIpAddress(o)| className(m)| timer(o)| detailedMessage(o)-->
-    <property name="default-log-pattern"
-              value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{uuid}|%X{serviceInstanceID}|%thread||${ECOMP-subcomponent-name}|%X{userId}|%level|%X{alarmSeverity}|%X{localAddr}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=&lt;%M&gt;, Desc=&lt;%msg&gt;%n" />
-
-    <property name="asdc-debug-log-pattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg %n"/>
-
-    <!-- All log -->
-    <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
-        <then>
-            <appender name="ALL_ROLLING"
-                      class="ch.qos.logback.core.rolling.RollingFileAppender">
-                <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log
-                </file>
-
-                <rollingPolicy
-                        class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-                    <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i
-                    </fileNamePattern>
-                    <minIndex>1</minIndex>
-                    <maxIndex>10</maxIndex>
-                </rollingPolicy>
-
-                <triggeringPolicy
-                        class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-                    <maxFileSize>20MB</maxFileSize>
-                </triggeringPolicy>
-                <encoder>
-                    <pattern>${default-log-pattern}</pattern>
-                </encoder>
-            </appender>
-
-            <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender">
-                <appender-ref ref="ALL_ROLLING" />
-            </appender>
-        </then>
-    </if>
-
-    <!-- Error log -->
-    <appender name="ERROR_ROLLING"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/Error.log
-        </file>
-
-        <!-- Audit messages filter - deny audit messages -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>AUDIT_MARKER</marker>
-            </evaluator>
-            <onMismatch>NEUTRAL</onMismatch>
-            <onMatch>DENY</onMatch>
-        </filter>
-
-        <!-- Transaction messages filter - deny Transaction messages -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>TRANSACTION_MARKER</marker>
-            </evaluator>
-            <onMismatch>NEUTRAL</onMismatch>
-            <onMatch>DENY</onMatch>
-        </filter>
-
-        <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>INFO</level>
-        </filter>
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-            <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/Error.log.%i
-            </fileNamePattern>
-            <minIndex>1</minIndex>
-            <maxIndex>10</maxIndex>
-        </rollingPolicy>
-
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <maxFileSize>20MB</maxFileSize>
-        </triggeringPolicy>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- encoders are assigned the type
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
         <encoder>
-            <pattern>${default-log-pattern}</pattern>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
         </encoder>
     </appender>
 
-    <!-- Debug log -->
-    <appender name="DEBUG_ROLLING"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log
-        </file>
-
-        <!-- No need to deny audit messages - they are INFO only, will be denied
-            anyway -->
-        <!-- Transaction messages filter - deny Transaction messages, there are
-            some DEBUG level messages among them -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>TRANSACTION_MARKER</marker>
-            </evaluator>
-            <onMismatch>NEUTRAL</onMismatch>
-            <onMatch>DENY</onMatch>
-        </filter>
-
-        <!-- accept DEBUG and TRACE level -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
-                <expression>
-                    e.level.toInt() &lt;= DEBUG.toInt()
-                </expression>
-            </evaluator>
-            <OnMismatch>DENY</OnMismatch>
-            <OnMatch>NEUTRAL</OnMatch>
-        </filter>
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-            <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i
-            </fileNamePattern>
-            <minIndex>1</minIndex>
-            <maxIndex>10</maxIndex>
-        </rollingPolicy>
-
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <maxFileSize>20MB</maxFileSize>
-        </triggeringPolicy>
-        <encoder>
-            <pattern>${default-log-pattern}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- Debug log -->
-    <appender name="MIGRATION_DEBUG_ROLLING"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/cassandra2zusammen_migration_debug.log
-        </file>
-
-        <!-- No need to deny audit messages - they are INFO only, will be denied
-            anyway -->
-        <!-- Transaction messages filter - deny Transaction messages, there are
-            some DEBUG level messages among them -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>TRANSACTION_MARKER</marker>
-            </evaluator>
-            <onMismatch>NEUTRAL</onMismatch>
-            <onMatch>DENY</onMatch>
-        </filter>
-
-        <!-- accept DEBUG and TRACE level -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
-                <expression>
-                    e.level.toInt() &lt;= DEBUG.toInt()
-                </expression>
-            </evaluator>
-            <OnMismatch>DENY</OnMismatch>
-            <OnMatch>NEUTRAL</OnMatch>
-        </filter>
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-            <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log.%i
-            </fileNamePattern>
-            <minIndex>1</minIndex>
-            <maxIndex>10</maxIndex>
-        </rollingPolicy>
-
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <maxFileSize>20MB</maxFileSize>
-        </triggeringPolicy>
-        <encoder>
-            <pattern>${asdc-debug-log-pattern}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- Audit log -->
-    <appender name="AUDIT_ROLLING"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-
-        <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log
-        </file>
-
-        <!-- Audit messages filter - accept audit messages -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>AUDIT_MARKER</marker>
-            </evaluator>
-            <onMismatch>DENY</onMismatch>
-            <onMatch>ACCEPT</onMatch>
-        </filter>
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-            <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i
-            </fileNamePattern>
-            <minIndex>1</minIndex>
-            <maxIndex>10</maxIndex>
-        </rollingPolicy>
-
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <maxFileSize>20MB</maxFileSize>
-        </triggeringPolicy>
-        <encoder>
-            <pattern>${default-log-pattern}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- SdncTransaction log -->
-    <appender name="TRANSACTION_ROLLING"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-
-        <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log
-        </file>
-
-        <!-- Transaction messages filter - accept audit messages -->
-        <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
-            <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
-                <marker>TRANSACTION_MARKER</marker>
-            </evaluator>
-            <onMismatch>DENY</onMismatch>
-            <onMatch>ACCEPT</onMatch>
-        </filter>
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
-            <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log.%i
-            </fileNamePattern>
-            <minIndex>1</minIndex>
-            <maxIndex>10</maxIndex>
-        </rollingPolicy>
-
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <maxFileSize>20MB</maxFileSize>
-        </triggeringPolicy>
-        <encoder>
-            <pattern>${default-log-pattern}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- Asynchronicity Configurations -->
-    <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="DEBUG_ROLLING" />
-    </appender>
-
-    <appender name="ASYNC_TRANSACTION" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="TRANSACTION_ROLLING" />
-    </appender>
-
-    <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="ERROR_ROLLING" />
-    </appender>
 
 
-    <root level="INFO">
-        <appender-ref ref="ASYNC_ERROR" />
-        <appender-ref ref="ASYNC_DEBUG" />
-        <appender-ref ref="AUDIT_ROLLING" />
-        <appender-ref ref="ASYNC_TRANSACTION" />
-        <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
-            <then>
-                <appender-ref ref="ALL_ROLLING" />
-            </then>
-        </if>
+    <root level="warn">
+        <appender-ref ref="STDOUT"/>
     </root>
 
-    <logger name="org.openecomp.sdc" level="INFO" />
-
-    <logger name="org.openecomp.core" level="DEBUG" additivity="false">
-        <appender-ref ref="MIGRATION_DEBUG_ROLLING" />
-    </logger>
-</configuration>
-
-
+</configuration>
\ No newline at end of file
