Updated the writing example to include a line ending setter