extract errors utils to common package and add gotcp2 demo