ensure datafile is created before running script