Fix compilation error due to incorrect value

Make get_image_info() return EIO on fail.
Wait for xseg I/O handler initialization to complete