I am trying to read a file using the fs library then replace some elements after an iteration then return the composed string However, the function returns undefined