Removing \r from generator in order to prevent ^M from being inserted into line endings after generation