throw an I/O error if get_devices fails