check for errors on each conn.Write