                                     (.close ac)
                                     (close! res-ch)))))
               (let [file-name (-> path .toString)
-                    fn        (-> path .getFileName .toString)
-                    env       (update-in env [:msg :keys] file-name)]
+                    fn-l      (-> path .getFileName .toString)
+                    env       (update-in env [:msg :keys] (fn [_] file-name))
+                           ]
                 (if (clojure.string/includes? file-name "meta")
                   (into list-keys (map
-                                   #(let [old-file-name (-> path .toString)
-                                          fn            (-> path .getFileName .toString)
-                                          env           (update-in env [:msg :keys] old-file-name)]
-                                      (migrate-file-v2 folder fn env buffer-size old-file-name fn serializer read-handlers write-handlers))
+                                   #(let [old-file-name (-> % .toString)
+                                          fn            (-> % .getFileName .toString)
+                                          env           (assoc-in env [:msg :keys] old-file-name)]
+                                      (migrate-file-v2 folder fn-l env buffer-size old-file-name file-name serializer read-handlers write-handlers))
                                    (Files/newDirectoryStream (Paths/get file-name (into-array String [])))))
-                  (conj list-keys (migrate-file-v1 folder fn env buffer-size file-name fn serializer read-handlers write-handlers))))))
+                  (conj list-keys (migrate-file-v1 folder fn-l env buffer-size file-name file-name serializer read-handlers write-handlers))))))
           #{}
           file-paths)
          async/merge
          (async/into #{}))))
 
-(defrecord FileSystemStore [folder serializer read-handlers write-handlers buffer-size detect-old-version locks config]
+(defrecord FileSystemStore [folder serializer compressor encryptor read-handlers write-handlers buffer-size detect-old-version locks config]
   PEDNAsyncKeyValueStore
   (-get [this key]
     (io-operation [key] folder config serializer read-handlers write-handlers buffer-size {:operation :read-edn
+                                                                                           :compressor compressor
+                                                                                           :encryptor  encryptor
                                                                                            :format    :data
                                                                                            :version version
                                                                                            :detect-old-files detect-old-version

          meta-size            (.size bos)
          _                    (.close bos)
          start-byte           (+ Long/BYTES meta-size)
          serializer-id        22  #_(->> (type serializer) (get ser/class->serializer) (get ser/serializer->int))
          byte-array           (to-byte-array version serializer-id meta-size)]
      (go-try
        (<? (write-edn ac-new key serializer write-handlers 0 meta byte-array))

            (ex-info "Could not read key."
                     (assoc msg :exception e))))))))

(defn- migrate-file-v1
  "Migration Function For Konserve Version, who has old file-schema."
  [folder key {:keys [version input up-fn detect-old-files operation msg]} buffer-size old-file-name new-file-name serializer read-handlers write-handlers]
  (let [standard-open-option (into-array StandardOpenOption [StandardOpenOption/READ])
