stop when got IOError