diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
index c403520..14fc77a 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
@@ -169,9 +169,8 @@
 
     }
 
-    protected void validateZip(Wrapper<Response> responseWrapper, File file, String payloadName) throws FileNotFoundException {
-        InputStream fileInputStream = new FileInputStream(file);
-        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(new ZipInputStream(fileInputStream));
+    protected void validateZip(Wrapper<Response> responseWrapper, File file, String payloadName) {
+        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(file);
         if (payloadName == null || payloadName.isEmpty() || !unzippedFolder.containsKey(payloadName)) {
             log.info("Invalid json was received. payloadName should be yml file name");
             Response errorResponse = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT));
@@ -179,9 +178,8 @@
         }
 
     }
-    protected void validateCsar(Wrapper<Response> responseWrapper, File file, String payloadName) throws FileNotFoundException {
-        InputStream fileInputStream = new FileInputStream(file);
-        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(new ZipInputStream(fileInputStream));
+    protected void validateCsar(Wrapper<Response> responseWrapper, File file, String payloadName) {
+        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(file);
         if (payloadName == null || payloadName.isEmpty() || unzippedFolder.isEmpty()) {
             log.info("Invalid json was received. payloadName should be yml file name");
             Response errorResponse = buildErrorResponse(getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT));
@@ -190,20 +188,18 @@
 
     }
 
-    protected void fillZipContents(Wrapper<String> yamlStringWrapper, File file) throws FileNotFoundException {
+    protected void fillZipContents(Wrapper<String> yamlStringWrapper, File file) {
         extractZipContents(yamlStringWrapper, file);
     }
 
-    public static void extractZipContents(Wrapper<String> yamlStringWrapper, File file) throws FileNotFoundException {
-        InputStream fileInputStream = new FileInputStream(file);
-        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(new ZipInputStream(fileInputStream));
+    public static void extractZipContents(Wrapper<String> yamlStringWrapper, File file) {
+        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(file);
         String ymlName = unzippedFolder.keySet().iterator().next();
         fillToscaTemplateFromZip(yamlStringWrapper, ymlName, file);
     }
 
-    private static void fillToscaTemplateFromZip(Wrapper<String> yamlStringWrapper, String payloadName, File file) throws FileNotFoundException {
-        InputStream fileInputStream = new FileInputStream(file);
-        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(new ZipInputStream(fileInputStream));
+    private static void fillToscaTemplateFromZip(Wrapper<String> yamlStringWrapper, String payloadName, File file) {
+        Map<String, byte[]> unzippedFolder = ZipUtil.readZip(file);
         byte[] yamlFileInBytes = unzippedFolder.get(payloadName);
         String yamlAsString = new String(yamlFileInBytes, StandardCharsets.UTF_8);
         log.debug("received yaml: {}", yamlAsString);
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/ZipUtil.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/ZipUtil.java
index 2711a29..2036e23 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/ZipUtil.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/ZipUtil.java
@@ -20,11 +20,11 @@
 
 package org.openecomp.sdc.common.util;
 
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.openecomp.sdc.common.log.wrappers.Logger;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
+import java.io.*;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
@@ -41,20 +41,20 @@
 	private ZipUtil() {
 	}
 
+	public static Map<String, byte[]> readZip(File file) {
+        try(InputStream fileInputStream = new FileInputStream(file)){
+	        return readZip(IOUtils.toByteArray(fileInputStream));
+        } catch (IOException e) {
+            log.info("close File stream failed - {}" , e);
+            return null;
+        }
+    }
+
 	public static Map<String, byte[]> readZip(byte[] zipAsBytes) {
-
-		ZipInputStream zis = null;
-		zis = new ZipInputStream(new ByteArrayInputStream(zipAsBytes));
-
-		return readZip(zis);
-	}
-
-	public static Map<String, byte[]> readZip(ZipInputStream zis) {
-
 		Map<String, byte[]> fileNameToByteArray = new HashMap<>();
-
 		byte[] buffer = new byte[1024];
-		try {
+        try(ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(zipAsBytes);
+			ZipInputStream zis = new ZipInputStream(byteArrayInputStream)) {
 			// get the zipped file list entry
 			ZipEntry ze = zis.getNextEntry();
 
@@ -75,25 +75,10 @@
 					}
 				}
 				ze = zis.getNextEntry();
-
 			}
-
-			zis.closeEntry();
-			zis.close();
-
 		} catch (IOException ex) {
-			log.info("close Byte stream failed - {}" , ex);
+			log.info("close Byte stream failed" , ex);
 			return null;
-		} finally {
-			if (zis != null) {
-				try {
-					zis.closeEntry();
-					zis.close();
-				} catch (IOException e) {
-					log.info("Close ZipInputStream failed - {}" , e);
-				}
-
-			}
 		}
 
 		return fileNameToByteArray;
@@ -115,7 +100,7 @@
 			ZipUtil.readZip(zipAsBytes);
 
 		} catch (IOException e) {
-			log.info("close Byte stream failed - {}" , e);
+			log.info("close Byte stream failed" , e);
 		}
 
 	}
