Add new lines and add encoding