fixed reading file: support an arbitry number of dataset