Revert "removed testing code and logging"

This reverts commit 34cde81d8e5a0b1b1f66ae3df2b4c8130c95dc27.