try{ File file = FileUtil.getDirectoryPath(root,MONITOR_STATE_FILE); if(file.exists()) {
try { File file = new File(environmentContext.getJbiRootDir(), root.getName() + ".xml"); if (file.exists()) {
    private Map readState(File root){        Map result = new HashMap();        try{            File file = FileUtil.getDirectoryPath(root,MONITOR_STATE_FILE);            if(file.exists()) {                result = (Map) XmlPersistenceSupport.read(file);            }else {                log.debug("State file doesn't exist: " + file.getPath());            }        }catch(Exception e){            log.error("Failed to read file state from: "+root,e);        }        return result;    }