fixed saving of sample to correct output folder