remove some newlines from output messages. error() appends the newline already.