Given a topological space $X$ is path-connected and locally path-connected. Say $p:Z \rightarrow Y$ is a covering map such that $p(z_0)=y_0$. A map $f:X \rightarrow Y$ is continuous and $x_0 \in X$ be such that $f(x_0)=y_0$. Also given that $f_*(\pi_1(X,x_0))\subset p_*(\pi_1(Z,z_0))$.
I am trying to show that $f$ can be lifted to a $Z$ via $p$ and the lift maps $x_0$ to $z_0$.
I have proceeded like this:
As $X$ is path connected so given $x \in X$, we have a path $\alpha$ from $x_0$ to $x$. Then I have a unique lifting of $f \circ \alpha$ to a path $\widetilde{f \circ \alpha}$ in $Z$ starting from $z_0$. I defined $\tilde{f}$ from $X$ to $Z$ as $\tilde{f}(x)= \widetilde{f \circ \alpha}(1)$.
I believe that $\tilde{f}$ will be the required lifting of $f$. And to show only the existence of such a lift local path-connectedness of $X$ is redundant. All it remains to finish the proof is that $\tilde{f}$ is well-defined i.e. independent of the path $\alpha$.
Am I proceeding correctly ? How do I show the well-definedness of $\tilde{f}$?