When I checked the Encoded message in the dashboard of Mirth connect, the new line was coming. So I thought that it might be the issue with File writer of the destination.
And then found that, it was only the default Notepad of windows that does not show the new line. Opening the generated file in any other editors included the new line. :)