write to file, and file with the data