code: void writeTransactionIdFile(StorageDirectory sd, long txid) throws IOException {
      if (txid < -1) {
        // -1 is valid when formatting
        throw new IOException("Bad txid: " + txid);
      }
      File txIdFile = getStorageFile(sd, NameNodeFile.SEEN_TXID);
      OutputStream fos = new AtomicFileOutputStream(txIdFile);
      try {
        fos.write(String.valueOf(txid).getBytes());
        fos.write('\n');
        fos.close();
        fos = null;
      } finally {
        IOUtils.cleanup(LOG, fos);
      }
    }
docs: Write last checkpoint time into a separate file.
  
  @param sd
  @throws IOException