Added diagnostic printouts to client