write data out to file 1
