Added better logging on db events