Replaced errors with common I/O error classes.