diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
index 1e6e3ef..e62c878 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/admin/PolicyManagerServlet.java
@@ -25,7 +25,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -150,34 +149,22 @@
 	protected static void initializeJSONLoad() {
 		closedLoopJsonLocation = Paths.get(XACMLProperties
 				.getProperty(XACMLRestProperties.PROP_ADMIN_CLOSEDLOOP));
-		FileInputStream inputStream = null;
-		JsonReader jsonReader = null;
 		String location = closedLoopJsonLocation.toString();
-		try {
-			inputStream = new FileInputStream(location);
-			if (location.endsWith("json")) {
-				jsonReader = Json.createReader(inputStream);
-				policyNames = jsonReader.readArray();
-				serviceTypeNamesList = new ArrayList<>();
-				for (int i = 0; i < policyNames.size(); i++) {
-					javax.json.JsonObject policyName = policyNames.getJsonObject(i);
-					String name = policyName.getJsonString("serviceTypePolicyName").getString();
-					serviceTypeNamesList.add(name);
-				}
+		if (! location.endsWith("json")) {
+			LOGGER.warn("JSONConfig file does not end with extension .json");
+			return;
+		}
+		try (FileInputStream inputStream = new FileInputStream(location);
+			JsonReader jsonReader = Json.createReader(inputStream)) {
+			policyNames = jsonReader.readArray();
+			serviceTypeNamesList = new ArrayList<>();
+			for (int i = 0; i < policyNames.size(); i++) {
+				javax.json.JsonObject policyName = policyNames.getJsonObject(i);
+				String name = policyName.getJsonString("serviceTypePolicyName").getString();
+				serviceTypeNamesList.add(name);
 			}
-		} catch (FileNotFoundException e) {
+		} catch (IOException e) {
 			LOGGER.error("Exception Occured while initializing the JSONConfig file"+e);
-		}finally{
-			try {
-				if(inputStream != null){
-					inputStream.close();
-				}
-				if(jsonReader != null){
-					jsonReader.close();
-				}
-			} catch (IOException e) {
-				LOGGER.error("Exception Occured while closing the File InputStream"+e);
-			}
 		}
 	}
 
diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
index dc2159b..267d5fa 100644
--- a/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
+++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyManagerServletTest.java
@@ -19,6 +19,7 @@
  */
 package org.onap.policy.admin;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.BufferedReader;
@@ -134,12 +135,46 @@
         	when(servletConfig.getInitParameter("XACML_PROPERTIES_NAME")).thenReturn("xacml.admin.properties");
         	System.setProperty("xacml.rest.admin.closedLoopJSON", new File(".").getCanonicalPath() + File.separator + "src"+ File.separator + "test" + File.separator + "resources" + File.separator + "JSONConfig.json");
 			servlet.init(servletConfig);
+			
+			assertTrue(PolicyManagerServlet.getServiceTypeNamesList().size() > 0);
+			assertTrue(PolicyManagerServlet.getPolicyNames().size() > 0);
+			
 		} catch (Exception e1) {
 			logger.error("Exception Occured"+e1);
 			fail();
 		}
 	}
 	
+	@Test
+	public void testBadInitJson() {
+		PolicyManagerServlet servlet = new PolicyManagerServlet();
+		ServletConfig servletConfig = mock(ServletConfig.class);       
+        try {
+        	when(servletConfig.getInitParameterNames()).thenReturn(Collections.enumeration(headers));
+        	when(servletConfig.getInitParameter("XACML_PROPERTIES_NAME")).thenReturn("xacml.admin.properties");
+        	System.setProperty("xacml.rest.admin.closedLoopJSON", new File(".").getCanonicalPath() + File.separator + "src"+ File.separator + "test" + File.separator + "resources" + File.separator + "JSONConfig.foo");
+			servlet.init(servletConfig);
+		} catch (Exception e1) {
+			logger.error("Exception Occured"+e1);
+			fail();
+		}
+	}
+	
+	@Test
+	public void testBadInitJsonInvalidFile() {
+		PolicyManagerServlet servlet = new PolicyManagerServlet();
+		ServletConfig servletConfig = mock(ServletConfig.class);       
+        try {
+        	when(servletConfig.getInitParameterNames()).thenReturn(Collections.enumeration(headers));
+        	when(servletConfig.getInitParameter("XACML_PROPERTIES_NAME")).thenReturn("xacml.admin.properties");
+        	System.setProperty("xacml.rest.admin.closedLoopJSON", new File(".").getCanonicalPath() + File.separator + "src"+ File.separator + "test" + File.separator + "resources" + File.separator + "IDonotExist.json");
+			servlet.init(servletConfig);
+		} catch (Exception e1) {
+			logger.error("Exception Occured"+e1);
+			fail();
+		}
+	}
+
 	@SuppressWarnings("static-access")
 	@Test
 	public void testDescribePolicy(){
