addes write data to file