Added some exception support around DB operations.
Improved error catching for non-connects.
Various improvements in logging and stats.  Cleaned up the logroate script.
Improved stats.