Added error messages and snd/recv