Fixed bug in handshake logging