private void saveProperty(String key, String value, String propFileDir) {

        Properties tempPathProp = new Properties();
        FileOutputStream outputStream = null;
        InputStream inputStream = null;
        try {

            File tempPathFile = new File(propFileDir);
            if (!tempPathFile.exists())
                tempPathFile.createNewFile();

            if (tempPathFile != null && tempPathFile.exists()) {
                inputStream = new FileInputStream(tempPathFile);
                tempPathProp.load(inputStream);
            }

            tempPathProp.setProperty(key, value);
            outputStream = new FileOutputStream(tempPathFile);
            tempPathProp.store(outputStream, "");

        } catch (FileNotFoundException e) {
            logger.error(e);
        } catch (IOException e) {
            logger.error(e);
        } finally {
            try {
                if (outputStream != null) {
                    outputStream.close();
                }

                if (inputStream != null) {
                    inputStream.close();
                }
            } catch (IOException e) {
                logger.error(e);
            }
        }
    }