attempt at better logging