Handle IOexception