Added flexible buffering to deal with huge csv files.