remove extra newline at end of formatted list output