#77 Added functions to check for expired logs.
#77 Bug fixes and tests.