update simple socket with better debugging