fixed export on windows with newline arg for file writer