Improve the printing of debug traces from the switch