deleteOldDatabaseEntries only on database logging enabled