Updated the writing example to include a line ending