made the database logging indepentent with a 5 minute interval