Only add newline if there is content.