Handle io exception