only redirect stdout to log
copy chrono_sort and ensure_dir_exists to event/__init__.py