   ([file algorithm]
    (let [file (io/file file)
          hash-fn (data/hasher algorithm)]
-     (when (and (.exists file) (pos? (.length file)))
-       (data/create-block
-         (hash-fn (FileInputStream. file))
-         (.length file)
-         (Instant/ofEpochMilli (.lastModified file))
-         (fn reader [] (FileInputStream. file)))))))
+     (io!
+       (when (and (.exists file) (pos? (.length file)))
+         (data/create-block
+           (hash-fn (FileInputStream. file))
+           (.length file)
+           (Instant/ofEpochMilli (.lastModified file))
+           (fn reader [] (FileInputStream. file))))))))
 
 
 (defn open

(defmacro ^:private measure-method
  "Anophoric macro to measure a store method."
  [[method-kw args] & body]
  `(meter/measure-method*
     ~'store ~(name method-kw) ~args
     (fn body# [] ~@body)))


(defn list

  block. If the block is already loaded, it is returned unchanged. The returned
  block will have the same metadata as the one given."
  [block]
  (io!
    (if (lazy? block)
      (with-meta
        (data/read-block
          (:algorithm (:id block))
          (data/content-stream block nil nil))
        (meta block))
      block)))


(defn validate!
