sampleIDs not correctly written to file