move samplefile processing to separate script