added error field to running stats, and made retention values configurable in app conf