added options for recording db stats