removing extraneous newlines on stdout debug messages