Added Support for custom line ending, default \r\n
Fixed \r\n and space indentation