Fix a bug in the store-data-into-file