[backend] strip bogus newline in printlog