Added support for working past midnight and changing log directories.