fixed data ordering problem in csv and file format issues