public static void writeMyEphemeralNodeOnDisk(String fileContent) {
    String fileName = ZNodeClearer.getMyEphemeralNodeFileName();
    if (fileName == null) {
      LOG.warn("Environment variable HBASE_ZNODE_FILE not set; znodes will not be cleared "
        + "on crash by start scripts (Longer MTTR!)");
      return;
    }

    FileWriter fstream;
    try {
      fstream = new FileWriter(fileName);
    } catch (IOException e) {
      LOG.warn("Can't write znode file " + fileName, e);
      return;
    }

    BufferedWriter out = new BufferedWriter(fstream);

    try {
      try {
        out.write(fileContent + "\n");
      } finally {
        try {
          out.close();
        } finally {
          fstream.close();
        }
      }
    } catch (IOException e) {
      LOG.warn("Can't write znode file " + fileName, e);
    }
  }
Logs the errors without failing on exception.
hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java