remove duplication of newlines

`each_line` passes strings that holds a newline character. So, I think a new line character in per lines is inserted twice in current implementation.