added csv2heapfile and fixed some bugs