Add a bunch of logging