         (while (not (resource/is-night-over? current-night))
           (Thread/sleep DAY_CHECK_TIME_MILLIS))
 
-        (resource/stop-night current-night)))))
+        (resource/stop-night current-night))))
+
+(def main-task {:name "iyye.bios.main" :function main-loop :task-future (ref 0) :parent nil :children (ref (list))})
 
 (defn- load-state [name]
   (log/info "first day load")

        "load"  (if (persistence/iyye-exists? (:name options)) (load-state (:name options)) (exit -1 "Does not exist")))))

  (doall  (iolist/init-io))
  ; Start in a thread so that I can use REPL too
  (-> (Thread. main-loop) .start))

            [iyye.bios.resource :as resource]
            [iyye.bios.persistence :as persistence]
            [iyye.bios.noun-words :as nouns]
            [iyye.bios.task :as task]
            [clojure.tools.logging :as log]
            [clojure.tools.cli :refer [parse-opts]]
            [clojure.string :as str]))
