@SuppressWarnings("unchecked")
	public static void onReadMSConfig(JSONObject json){
		
		log.info("onReadMSConfig called.. : " + json.toJSONString());
		MSConfig serviceCfg = MSConfig.getInstance();
		
    	String fileName = serviceCfg.getConfigMap().get("MSConfigFile");
		InputStream ins;
		BufferedReader br;
		
		try {
			
			File file = new File(fileName);
			DataInputStream in;
			
			@SuppressWarnings("resource")
			FileChannel channel = new RandomAccessFile(file, "rw").getChannel();
			FileLock lock = channel.lock();
			
			try{
				
				ins = new FileInputStream(file);
				in = new  DataInputStream(ins);
				br = new BufferedReader(new InputStreamReader(in));
				
				String line = "";
				
				while((line = br.readLine()) != null){
					
					//log.info("Line :" + line);
					for(ModSecConfigFields field: ModSecConfigFields.values() ){
						
						if(line.startsWith(field.toString())){
							
							if(line.trim().split(" ")[0].equals(field.toString())){
								json.put(field.toString(), line.trim().split(" ")[1].replace("\"", ""));
							}
							
						}
						
					}
					
				}
				log.info("ModSecurity Configurations configurations Loaded ... ");
			
			} finally{
				
				lock.release();
				
			}
			br.close();
			in.close();
			ins.close();
			
			
		} catch (FileNotFoundException e1) {
			
			json.put("status", "1");
			json.put("message", "configuration file not found");
			e1.printStackTrace();
			
		} catch(IOException | NullPointerException e){
			
			json.put("status", "1");
			json.put("message", "configuration file is corrupt");
			e.printStackTrace();
			
		}
		
		log.info("Sending Json :" + json.toJSONString());
		ConnectorService.getConnectorProducer().send(json.toJSONString());
		json.clear();
		
	}