Use new API functions for --merge mode
Implement --nonewline mode