Closed map on open cover I thought this was true for a while, but I'm struggling to come up with a proof. I must be missing something obvious.

Let $f: X \to Y$ be a continuous map. Suppose $\{V_i\}$ is a finite open cover and define $U_i := f^{-1}(V_i)$. Suppose that $f_i:= f|_{U_i}: U_i \to V_i$ is a closed map for each $i$. Then $f$ is a closed map.

My idea is as follows. Let $C \subset X$ be a closed set. Then
$$ f(C) = f( \bigcup_i C \cap U_i) = \bigcup_i f(C \cap U_i)$$. So each $f(C \cap U_i)$ is a closed subset of $V_i$. How can I conclude $f(C)$ is closed? Or is this even true? Feel free to add some assumptions if you like.
 A: Let $X=Y=\{a,b,c\}$, with topology $\mathscr T=\{\varnothing,\{a\},\{b,c\},X\}$. Let $f:X\to Y$ be the constant map at $a$ and take the open cover $V_1=\{a\}$, $V_2=\{b,c\}$. Then $U_1=X$ and $U_2=\varnothing$.
Now, $f_1:X\to V_1=\{a\}$ is constant (and surjective), so it's closed, and $f_2$ is the empty map, which is trivially closed. But $f$ is not closed because we defined the image $\{a\}$ to be open in $Y$.
I should add, that the problem going on here is that you're defining $f_i$ as a map $U_i\to V_i$, and being closed in $V_i$ won't guarantee you closure in $Y$. If on the other hand, you define $f_i:U_i\to Y$, then if each $f_i$ is closed it follows that $f$ is closed. Your proof for this suddenly works because $C\cap U_i$ is closed in $U_i$, by definition of subspace, so $f(C\cap U_i)$ is closed in $Y$, and hence $f(C)$ is a finite union of sets which are closed in $Y$.
Edit: this answer is wrong, as user gvv has pointed out. I cannot delete my answer because it has been accepted already so OP, if you see this, please give gvv credit.
A: The claim you make is in fact correct, and can be extended to hold for an arbitrary (possibly infinite) open cover $Y = \cup_i V_i$. The proof for the finite case can be deduced from this question: Closedness with respect to an open cover, and I'll sketch a proof for the infinite case.
Suppose $E \subset X$ is closed and define $E_i := E \cap U_i$, $F:=f(E)$, $F_i := f(E_i) = F \cap V_i$ (verify this last equality). Now by assumption on $f$, $F_i$ is closed in $V_i$, hence of the form $F_i = V_i \cap F_i'$ for some $F_i' \subset Y$ closed. To prove that $F$ is closed, we write
$$ F = \cap_i (V_i^c \cup (F_i' \cap V_i)) = \cap_i (V_i^c \cup F_i'). $$
This is a intersection of closed sets (in $Y$) and hence closed.
