Revert "Remove various debug printfs"

This reverts commit 9216fa9c866dbea469bce369e6b8714a723a77b9.