Fix NRE in DataIO, still needs a some debugging