fixed writing to csv format