write data to file