restored final newline in output string