Prevent reading beyond EOF with CSV