Converting a csv file to rgf format