Fix test on IO (close out file)