Remove trailing newline char after dedup