Difficulty: 6/10File System (fs), Streams & I/O, Asynchronous JSYou can append data to an existing file in Node.js using the fs.appendFile() method. Here's an example:javascriptCopyScenario Questions0-2 years experience1We have a simple Express route that needs to log incoming request IPs to a local 'access.log' file. How would you write the code to append each IP on a new line without overwriting the existing logs, and how would you handle it if the file doesn't exist yet?2Imagine you used fs.writeFileSync to add a new user's email to a 'subscribers.txt' file, but you realized it keeps wiping out all the previous subscribers. What went wrong, and how would you fix it using the fs module?Follow-up QuestionsWhat is the difference in memory overhead between fs.appendFile and a WriteStream with the 'a' flag?How does Node.js handle backpressure when writing to a stream?What happens to the event loop if you use synchronous file append methods under high load?Suggest Improvement