Added a function put to write snippets into a csv file.