Add line ending handling