remove more current code for writing to file