                         doc-key     (get-doc-key json-key doc) 
                         _           (log/debug (str "doc-key: " doc-key))
                         riak-key    (Location. riak-bucket doc-key)
-                        riak-value  (BinaryValue/create 
-                                      ;; mem leak?
-                                      (json/write-str doc :escape-unicode false))
-                                      ;; mem leak ?
+                        json-byte   (.getBytes (ches/generate-string doc))
+                        riak-value  (BinaryValue/unsafeCreate json-byte)
                         start       (. System (nanoTime))
                         ; check if this returns an error
                         _           (log/debug (str riak-client riak-bucket riak-key "riak-value"))
+                        ;returns {:ok ...} || {:err ...} could be checked
                         _           (riak-store! riak-client riak-bucket riak-key riak-value)
                         exec-time   (with-precision 3 
                                       (/ (- (. System (nanoTime)) start) 1000000.0)) ]

    [clojure.tools.cli      :as   cli   ]
    [clojure.tools.logging  :as   log   ]
    [clojure.edn            :as   edn   ]
    [clojure.core.async     :refer 
      [alts! chan go thread timeout 
       >! >!! <! <!! go-loop]           ]

        json-key        (get-in config [:ok :json-keys (keyword bucket-type)])
        _               (log/debug (str "json-key: " json-key))
        lines           (lazy-lines (:file options))
        json-hmps       (map ches/parse-string lines)
        riak-cluster    (riak-connect2! 
                          (get-in config [:ok :env env :conn-string]))
        _               (.start riak-cluster)
