Revert "disable most debugging and logging"

This reverts commit f5208eca260b8fbac2a78ca706fd48a83e42390b.