better logging for debug