public Map<String, String> writeToFile() throws FileNotFoundException, IOException {

        File file = new File("property.prop");
        if (!file.exists()) {
            FileOutputStream fosTemp = new FileOutputStream("property.prop");
        }

        FileInputStream inputFis = new FileInputStream("property.prop");
        Properties inputDump = new Properties();
        inputDump.load(inputFis);
        //System.out.println("Now DB contains " + inputDump.size() + " entries.");

        //Copying all the DB from file "properties.prop" into a Map<S, S> allTemp
        Map<String, String> allTemp = new HashMap<>();
        Set<Object> allKeySet = inputDump.keySet();
        for (Object o : allKeySet) {
            allTemp.put((String) o, (String) inputDump.get(o));
        }

        Properties properties = new Properties();
        
        FileOutputStream fos = new FileOutputStream("property.prop");
        
        Map<String, String> newUpdates = new HashMap<>();

        Set<String> currentMapSet = currentMap.keySet();
        for (String s : currentMapSet) {
            if (!allTemp.containsKey(s)) {
                newUpdates.put(s, currentMap.get(s));
                //Now allTemp contains both old and new entries
                allTemp.put(s, currentMap.get(s));
                //properties.put(s, currentMap.get(s));            
            }
        }
        //System.out.println("You have " + newUpdates.size() + " new entries");
        properties.putAll(allTemp);
        properties.store(fos, "property.prop");

        return newUpdates;
           
    }