add writing to file