fix data file handling