                   :when (not (.isDirectory (io/file filepath)))
                   typepattern typepatterns
                   :when (re-matches (first typepattern) filepath)
-                  :let [mark (get commentDict (re-find #"(?<=\w)\..*$" filepath))]
+                  :let [mark (get commentDict (re-find #"(?<=\w)\.\w+$" filepath))]
                   :when mark]
               (conj (read-comments-in-file filepath (get commentDict (last typepattern)))
                     filepath))))))

  ([commentDict]
   (doall (for [filepath (get-all-files)
                :when (not (.isDirectory (io/file filepath)))
                :let [mark (get commentDict (re-find #"(?<=\w)\..*$" filepath))]
                :when mark]
            (conj (read-comments-in-file filepath mark)
                  filepath))))
  ([commentDict root]
   (doall (for [filepath (get-all-files root)
                :when (not (.isDirectory (io/file filepath)))
                :let [mark (get commentDict (re-find #"(?<=\w)\..*$" filepath))]
                :when mark]
            (conj (read-comments-in-file filepath mark)
                  filepath))))

(defn -main [& args]
  (let [commentDict (read-json)
        [root & filetypes] args]
    ;(println commentDict)
    ;(println args)
    ;(println root)
    ;(println filetypes)
    (cond filetypes (println (read-files commentDict root filetypes))
          root (println (read-files commentDict root))
          :else (println (read-files commentDict))))
)
