add "flags": "a" to writestream to append to logs