Compact Open Topology Continuous Map Let $X, Y, Z$ be topological spaces such that $X$ is locally compact and Hausdorff, $Z$ is Hausdorff and $Y$ is arbitrary, and endow spaces of maps between spaces with the compact open topology.
I am trying to show that the map $\psi: (Y^X)^Z \to Y^{Z\times X} $ given by $$(Y^X)^Z \ni g \stackrel{\psi}{\mapsto} \left[(z,x)\mapsto (g(z))(x)\right]\in Y^{Z\times X}$$ is continuous.
(This is from Spanier page 6)
It is sufficient to work with subbasis elements to show continuity, so we take a generic subbasis element from $Open(Y^{Z\times X})$ and show its inverse image under $\psi$ is also open. Such a generic subbasis element is given by $<K, V>$ for some $K\in Compact(Z\times X)$ and $V\in Open(Y)$ where $<A, B>$ is the set of all continuous maps from $Z\times X \to Y$ so that the image of $A$ is in $B$.
I try to claim that $\psi^{-1}(<K,V>) = \bigcup_{k_z\in K_Z} <\{k_z\},<K_X(k_z), V>>$ where $K_Z$ is the projection of $K$ onto $Z$ (and is hence compact) and $K_X(k_z) \equiv \{x\in K_X|(k_z,x)\in K\}\subseteq K_X$ and is thus also compact for each $k_z$.
To show this claim, the $\boxed{\subseteq}$ direction is easy. However, I get stuck on the other direction, namely, of $\boxed{\supseteq}$, because if $g\in \bigcup_{k_z\in K_Z} <\{k_z\},<K_X(k_z), V>>$, one cannot say what happens at an arbitrary value of $\hat{k_z}\in K_Z$, as we only know there is some $k_z\in K_Z$ such that $g\in<\{k_z\},<K_X(k_z), V>>$.
What am I doing wrong? 
 A: Before we give the actual prove, we need

Lemma: Assume that $X,Z$ are locally compact Hausdorff spaces, and let $U$ be an open neighborhood of the compact set $K\subseteq Z\times X$. Then for each $z\in Z$, there is a compact neighborhood $V_z$ such that $$V_z\times\pi_X((V_z\times X)\cap K)⊆U$$
  Proof: For each $y=(z,x)\in K$ there are open boxes $W'_y×U'_y$ and $W_y×U_y$ such that 
  $$\overline{W'_y×U'_y}⊆W_y×U_y⊆U$$
  By compactness of $K$, finitely many boxes $B'_i=W'_i×U'_i=W'_{y_i}×U'_{y_i}$ cover $K$.
  Now pick a $z\in Z$. Then $\{z\}×X$ meets the interior of some boxes $B_i=W_i×U_i=W_{y_i}×U_{y_i}$, while avoiding the remaining closed boxes $\overline {B'_j}$. Therefore, $z$ has a compact neighborhood $V_z$ contained in the $W_{i}$ and disjoint from the $\overline{W'_{j}}$. Now take 
  $$P_z=V_z×\pi_X((V_z×X)\cap K)$$
  If $y'=(z',x')$ is in $P_z$, then $z'\in V_z$, while for some $z''\in V_z$ the pair $(z'',x')$ is in $K$ and thus in a box $B'_k$ such that $B_k$ intersects $\{z\}×X$. But then $z'$ is in $W_k$ and $x'$ is in $U_k$, so $y'∈B_k⊆U$.

If $f:Z\times X\to Y$ is a map, then $\hat f: X\to Y^Z,\, x\mapsto f_x=f(x,-),$ is a map again (I'll use the term map to mean continuous map). This is true regardless of any properties of the spaces involved, as long as $Y^Z$ is endowed with the compact open or some weaker topology.
If $K$ is compact in $Z\times X$ and $U$ is open in $Y$, we have the subbasic set $\langle K,U\rangle$, and we want to show that its preimage is open. To this end, let $\hat f\in\psi^{-1}(⟨K,U⟩)$, corresponding to a map $f:Z×X\to Y$. If we restrict $f$ to a map $K_Z×X\to Y$, then by the lemma, each point $z\in K_Z$ has a compact neighborhood $V_z$ such that $f(V_z×\pi_X((V_z×X)\cap K)⊆U$. By compactness there are $z_1,\dots,z_n$ such that $V_i=V_{z_i},i=1,\dots,n$, cover $K$. We see that $\hat f\in\bigcap_{i=1}^n⟨V_i,\,⟨\pi_X((V_i×X)\cap K),U⟩⟩$ and that this set is contained in $\psi^{-1}(⟨K,U⟩)$.
