Catch IOException in send instead of throwing it.