Let $E_1, E_2, M$ be smooth manifolds such that $\pi_1:E_1\to M$ and $\pi_2:E_2\to M$ are vector bundles with rank $k$. If $\phi:E_1\to E_2$ is a bijection which preserves fibers (i.e. $\left.\phi\right|_{\pi^{-1}_1(p)}$ is linear with image $\pi^{-1}_{2}(p)$, for every $p\in M$), prove that $\phi$ is smooth $\Leftrightarrow \phi\circ\sigma$ is smooth for every smooth section $\sigma \in \Gamma(E_1)$.
The implication $(\Rightarrow)$ is obvious.
To prove $(\Leftarrow)$, my idea is this: take an arbitrary $p$ and local frame $\{\sigma_1,...,\sigma_k\}$ (i.e., local sections $\sigma_1,...,\sigma_k$ on a neighbourhood $U$ of $p$ such that $\{\sigma_1(q),...,\sigma_k(q)\}$ is a basis for $\pi_1^{-1}(q)$ for all $q\in U$). Every $e\in\pi^{-1}_1(U)$ can be written as a linear combination of $\sigma_1(\pi_1(e)),...,\sigma_k(\pi_1(e))$ and, by linearity of $\left.\phi\right|_{\pi^{-1}_1(\pi_1(e))}$, we get:
\begin{align*} \phi(e) &= \phi\left(\sum_{i=1}^k a_i(e)\,\sigma_i(\pi_1(e))\right)\\ &= \sum_{i=1}^k a_i(e)\,\,\phi\circ\sigma_i\circ\pi_1(e) \end{align*}
(where $a_i(e)\in\mathbb{R}$ for all $i$)
If I can prove each $a_i:\pi_1^{-1}(U)\to\mathbb{R}$ is smooth, then I'm done. But is it true? How do I prove it?