CDXFile: Add end condition wrapping to CDXFile stream