Better logging on connection
Better handling of zero-length data