enabled directory to write to a csv file