Revert "try printing debug messages to log_fh"

This reverts commit 24ed63cf0304aab4ead9e6496ae4c1a0e2692e08.