More bug fixes for data file code