Remove newline before EOF