long lineNumber=1;
SampleSaveConfiguration saveConfig = CSVSaveService.getSampleSaveConfiguration(line,filename);
if (saveConfig == null) {// not a valid header
log.info(filename+" does not appear to have a valid header. Using default configuration.");
saveConfig = (SampleSaveConfiguration) resultCollector.getSaveConfig().clone(); // may change the format later
dataReader.reset(); // restart from beginning
lineNumber = 0;
}
String [] parts;
final char delim = saveConfig.getDelimiter().charAt(0);
// TODO: does it matter that an empty line will terminate the loop?