       [:create :write])
 
 When finished, be sure to `.close` it."
-  [db specs modes]
+  [^DB db specs modes]
   (let [needs-filename #{:file-hash
                          :file-tree
                          :directory-hash
                          :directory-tree
                          :plain-text}
 
-        db-type (do (assert (keyword? (:type specs))
-                            ":type needs to be a keyword")
-                    (assert (not (nil? (get db-specs (:type specs))))
+        db-type (do (println "checking DB type")
+                  (assert (not (nil? (get db-specs (:type specs))))
                             ":type needs to be found in db-specs")
                     (:type specs))
 
-        db-file (if (some needs-filename db-type)
-                  (do (assert (string? (:filename specs))
-                              ":filename needs to be a string")
-                      (assert (not= "" (:filename specs))
-                              ":filename cannot be an empty string")
-                      (str (:filename specs) (get db-specs db-type)))
-                  (get db-specs db-type))
-
-        tuned-db-file (if (and (map? (:tuning specs))
-                               (not (empty? (:tuning specs))))
-                        (-> (:tuning specs)
-                            (map (fn [[k v]] (str k "=" v)))
-                            (reduce #(str %1 "#" %2))
-                            (str db-file "#"))
-                        db-file)
+        db-file (do (println "checking db file")
+                    (if (some needs-filename [(:type specs)])
+                      (do (assert (string? (:filename specs))
+                                  ":filename needs to be a string")
+                          (assert (not= "" (:filename specs))
+                                  ":filename cannot be an empty string")
+                          (str (:filename specs) (get db-specs db-type)))
+                      (get db-specs db-type)))
+
+        tuned-db-file (do (println "checking tuning")
+                          (if (and (map? (:tuning specs))
+                                   (not (empty? (:tuning specs))))
+                            (->> (:tuning specs)
+                                 (map (fn [[k v]] (str k "=" v)))
+                                 (reduce #(str %1 "#" %2))
+                                 (str db-file "#"))
+                            db-file))
         
-        db-modes (do (assert (vector? modes)
-                             ":modes must be a vector")
-                     (assert (-> (map #(get open-options %) modes)
-                                 (map number?)
-                                 (reduce #(and %1 %2)))
+        db-modes (do (println "checking modes")
+                     (assert (vector? modes)
+                             "modes must be a vector")
+                     (assert (->> (map #(get open-options %) modes)
+                                  (map number?)
+                                  (reduce #(and %1 %2)))
                              "every specified mode must be in `open-options`")
-                     (-> (map #(get open-options %) modes)
-                         (apply bit-or 0)))]
-
+                     (->> (map #(get open-options %) modes)
+                          (apply bit-or 0)))]
+
+    (println "done checking stuff")
     (.open db tuned-db-file db-modes)
     db))
 

initial parameters, with simlar syntax to `let`.

An example would be merging hashes of people and animals together to see
who owns which pet, assuming that Ronin is being used as a graph database:

    (with-dbs [merged {:type :cache-hash :modes [:create :write :read]
               people (assoc people-spec :modes [:read])
               animals (assoc animal-spec :modes [:read])]
      (merge-dbs! :add merged people animals)

          "dbs-and-specs must not be empty.")
  (assert (even? (count dbs-and-specs))
          "dbs-and-specs must be of even length")
  (if (= 2 (count dbs-and-specs))
    `(with-db ~(vec dbs-and-specs) ~@body)
    `(with-db ~(vec (take 2 dbs-and-specs))
       (with-dbs ~(drop 2 dbs-and-specs)
