Adding an io error check in the write method in the disk utility class.