remove csvgen file as common function