code: public void createDefaultFile(String defaultFilePath, String initMessage) throws IOException {
          File file = new File(defaultFilePath);
          BufferedWriter bufferedWriterInit = null;
          try {
              if (!file.exists()) {
                  file.createNewFile();
                  bufferedWriterInit = new BufferedWriter(new FileWriter(defaultFilePath));
                  bufferedWriterInit.write(initMessage);
              }
          } catch (IOException e) {
              error("unable to create the Default-File", e);
          } finally {
              if(bufferedWriterInit != null) {
                  try {
                      bufferedWriterInit.close();
                  } catch (IOException e) {
                      error("Unable to close input stream", e);
                  }
              }
          }
      }
docs: Creates a default File in case it does not exist yet. Default files can be used to load other files that are
  created at runtime (like properties file)
  
  @param defaultFilePath path to default file.txt (or where it should be created)
  @param initMessage the string to write in default file
  @throws IOException is thrown by bufferedWriter