Add debug logging to diagnose functional tests.