added csv writer instead of manually crafting string to file

for printing best features to file added csv.writer class to handling logging
to file better than manually crafting strings