Setup data file writing.