Switch almost all fprintf function calls to tds_debug.