Check if sent() returned correctly, otherwise print errno message