Added \r as newline character, emits line on last line