What I want to show is that
If a line bundle (not necessarily locally trivial) has locally nonvanishing sections for each open set in the open cover of the base space, then it is locally trivial.
Precisely, Let $\pi: E \to X$ be a continuous map and $\pi^{-1}(x) \cong \mathbb{R}$ for any $x \in X$. Let $\{U_{i}\}_{i \in I}$ be an open cover of $X$. Suppose $s_{i}: U_{i} \to E$ is a locally nonvanishing section, i.e., a continuous map such that $s_{i}(x) \in \pi^{-1}(x)$ and $s_{i}(x) \neq 0 \in\pi^{-1}(x) \cong \mathbb{R}$.
Then, $\pi: E \to X$ is locally trivial, i.e., for any $x \in X$, there exists $U \subseteq X$ open neighborhood of $x$ such that $\pi^{-1}(U) \cong U\times \mathbb{R}$.
My trial is this; let $F = X \times \mathbb{R}$. Then it is a trivial vector bundle. Now define a map $$\phi_{i}: F \to E \text{ by } (x,v) \mapsto \begin{cases}vs_{i}(x) &\text{ if } x \in U_{i} \\ 0 \in \pi^{-1}(x) & \text{ if }x \not\in U_{i} \end{cases}.$$
Then $(\phi_{i})_{x}:\pi_{i}^{-1}(x) \to \pi^{-1}(x)$ is defined by $\begin{cases} v \mapsto vs_{i}(x)& \text{ if }x \in U_{i} \\ v \mapsto 0 \in \pi^{-1}(x)& \text{ if } x \not\in U_{i} \end{cases}.$ Since $s_{i}$ is nonvanishing at $U_{i}$, $(\phi_{i})_{x}$ is isomorphism. Also, $F \to E \to X$ and $F \to X$ commutes. However, I still confuse whether $\phi_{i}$ is continuous or not; it is clearly separately continuous but I'm not sure it is jointly continuous.
If we showed that it is continuous, then it would be a bundle morphism. Thus, for any $x \in X$, there exists $U_{i}$ containing $x$, thus $\pi|_{U_{i}}$ and $\pi_{i}$ are bundle isomorphism, so $\pi$ is locally trivial.
Is there anyone can help me to show that this $\phi_{i}$ is actually a continuous map? Or otherwise, is there any easy way to show the statement?