Check for bind/listen errors when creating socket