add some better logging