     :as this}
    key-dir
    long-term?]
+  (println "Reloading nonce")
+  (log/debug "Reloading nonce")
   (let [raw-path (str key-dir "/.expertsonly/")
         path (io/resource raw-path)]
     (let [f (io/file path "lock")]

           ::nonce-key]
    :as this}
   random-portion]
  (b-t/uint64-pack! data 8 random-portion)
  (let [secret-key (generate-symmetric-key "AES" 192)
        ;; Note that this is never(?) decrypted.
        ;; Q: Is there any reason for using this instead

                      (with-open [counter (io/output-stream nonce-counter)]
                        ;; FIXME: What's a good initial value?
                        (.write counter (byte-array 8))))
                    (println "Opening" nonce-counter)
                    (log/debug "Opening" nonce-counter)
                    (with-open [counter (io/input-stream nonce-counter)]
                      (println "Nonce counter file opened for reading")
                      (log/debug "Nonce counter file opened for reading")
                      (let [bytes-read (.read counter data 0 8)]
                        (println "Read the 8 bytes")
                        (when (not= bytes-read 8)
                          (throw (ex-info "Nonce counter file too small"
                                          {::contents (b-t/->string data)
