WIP: some refactoring to fcsv_to_hdf5