helper for logging and showing db changes