This should probably check that the io isn't closed, right?