     (when (nil? config-file)
       (exit 2 "Please supply a configuration file via -c option"))
     (let [cfg (read-config-file config-file)]
-      (when-not (valid-config? cfg)
-        (exit 3 "Please fix the configuration file"))
+      (when-let [errors (s/check config-schema cfg)]
+        (exit 3 (str "Please fix the configuration file: " errors)))
       (init! cfg)
       (siphon cfg))))
 

;; and now that some of the not relevant stuff
;; have been moved out is a bit cleaner,
;; but still not clear enough...
;; NEED NORE clean loop
;;
(defn siphon [{:keys [kafka-source elasticsearch-target]}]
  (loop [consumer (connect-to-kafka kafka-source)


(defn init! [config]
  (init-log!      (:logging-options config))
  (init-tracking! (:tracking config)))


