profiling to csv file (not finished)