Debug code for ClientCtrl