wrap error
fix extension flag in handshake
add profiling to example