Added a bit of logging