Adding some debug logic so the log output is clean.