changing writing to file