Added support for custom line ending