Added more debug prints to handshake.