I am trying to prove the following. (I posted this on math.se with no success)

Let $E,B$ be Riemannian manifolds. Suppose $\pi: E\to B$ is a Riemannian submersion.

For each $x\in E$, define $V_x E = \ker \pi_{*}$ and $H_xE = (V_x E)^{\perp}$. $W\in T_x E$ is said to be

horizontalif $W\in H_x E$.Let $\gamma:[0,1]\to E$ be a geodesic curve such that $\gamma'(0)$ is horizontal. Prove that $\gamma'(t)$ is horizontal for all $t\in [0,1]$.

**My attempt**

I mostly followed the proof here(Theorem 3.6).

Firstly, for any smooth curve $\gamma:[0,1]\to B$, there is always a locally defined *horizontal lift* to $E$. That is, for any $p\in \pi^{-1}(\gamma(0))$, there is $\epsilon>0$ and a smooth curve $\gamma_E:[0,\epsilon) \to E$ such that $\pi\circ \gamma_E = \gamma$, $\gamma_E(0)=p$ and $\gamma_E'$ is always horizontal.

So, we take a geodesic on $B$ with initial condition $\gamma_B(0)=\pi\circ\gamma(0), \gamma_B'(0)=\pi_{*}\gamma'(0)$. We can do so (at least locally) through the uniqueness and existence of geodesic.

Then, take a horizontal lift $\gamma_E:I\to E$ with $\gamma_E(0)=\gamma(0)$. Here, $I$ is an open subset of $[0,1]$ containing $0$.

We can prove that $\gamma_E$ is a geodesic. (This argument is not the main topic of this question.)

Then, by the uniqueness of geodesic, we have $\gamma_E(t) = \gamma(t)$ for $t\in I$.

**Here is the question.** It seems that we need to prove that $I$ is a closed(and therefore clopen) set of $[0,1]$, too. Then since $[0,1]$ is connected we have $I=[0,1]$. But I do not know how to do it.

For example, this book on the proof of Proposition 2.109, (ii),

(Here $\tilde{c}$ corresponds to our $\gamma$, and $c$ corresponds to $\gamma_B$)

...Hence the set of parameters where the geodesic $\tilde{c}$ is horizontal, and where it is a lift of $c$ is an open set containing $0$. These two conditions being also closed, they are satisfied on the maximal interval of definition of $\tilde{c}$.

Any help?