fixing reverse log reading skipping some newlines