The manipulator and formatter can be used to ensure a certain piece of output ends with a newline without introducing duplicate newline characters if the previous output ended with a newline already.