append a newline if outputting to terminal