throw IOError when send fails