     (let [file-descriptor (js/PLANCK_FILE_INPUT_STREAM_OPEN (:path file))]
       (check-file-descriptor file-descriptor file opts)
       (swap! open-file-input-stream-descriptors conj file-descriptor)
-      (planck.core/InputStream.
+      (planck.core/->InputStream
         (fn []
           (if (contains? @open-file-input-stream-descriptors file-descriptor)
             (js->clj (js/PLANCK_FILE_INPUT_STREAM_READ file-descriptor))

    (let [file-descriptor (js/PLANCK_FILE_WRITER_OPEN (:path file) (boolean (:append opts)) (:encoding opts))]
      (check-file-descriptor file-descriptor file opts)
      (swap! open-file-writer-descriptors conj file-descriptor)
      (planck.core/Writer.
        (fn [s]
          (if (contains? @open-file-writer-descriptors file-descriptor)
            (if-let [err (js/PLANCK_FILE_WRITER_WRITE file-descriptor s)]

    (let [file-descriptor (js/PLANCK_FILE_READER_OPEN (:path file) (:encoding opts))]
      (check-file-descriptor file-descriptor file opts)
      (swap! open-file-reader-descriptors conj file-descriptor)
      (planck.core/->BufferedReader
        (fn []
          (if (contains? @open-file-reader-descriptors file-descriptor)
            (let [[result err] (js/PLANCK_FILE_READER_READ file-descriptor)]
