public static void searchDirectory(String dir) {
        try {
            BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);
            prop.load(reader);
            reader.close();
            prop.setProperty("searchDirectory", dir);
            BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8);
            prop.store(writer, null);
            writer.close();
        } catch (IOException ex) {
            try {
                PropHandle.reset();
                BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8);
                prop.load(reader);
                reader.close();
                prop.setProperty("searchDirectory", dir);
                BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8);
                prop.store(writer, null);
                writer.close();
            } catch (FileNotFoundException ex1) {
                Logger.getLogger(ConfSetter.class.getName()).log(Level.SEVERE, null, ex1);
                throw new RuntimeException();
            } catch (IOException ex1) {
                Logger.getLogger(ConfSetter.class.getName()).log(Level.SEVERE, null, ex1);
                throw new RuntimeException();
            }
        }
    }