Catching IO errors.