remove duplication of newlines

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