writing samples back to files