Add logging facilities.
Add logging to scheduler and sources.
Refactor logging.
More robust logging.
Sort out file logger flushing.
Optionally catch SIGINT and SIGTERM.