Add IOError handling.