Let $(X,\tau)$ be a topological space. Suppose that $\{f_i\}_{i \in I}$ is a collection of continuous functions $X \rightarrow \mathbb{R}$ such that for every $x \in X$, there exists a neighborhood $U_x$ of $x$ such that $U_x$ intersects only finitely many of the sets $supp(f_i)$. Show that $f(x):=\sum_{i \in I}f_i(x)$ is a continuous function $X \rightarrow \mathbb{R}$ with $supp(f) \subseteq \bigcup_{i \in I} supp(f_i)$.
My attempt: I know the following: Let $A,B \in \tau$, and $X=A \cup B$, $f:X \rightarrow Y$. If $f_{|A}$ and $f_{|B}$ are continuous (regarding the subspace topologies $\tau_A=\tau \cap A$ respectively $\tau_B=\tau \cap B$), then $f$ is continuous.
So one way to approach this would be to show that for every $x \in X$, there exists an open neighborhood $U$ of $x$ such that $f_{|U}$ is continuous.
We know that for $f_i$, for every $x \in X$ there exists a neighborhood of $x$, $U_x$ such that $U_x$ intersects only finitely many $supp(f_i)$, let those be $i \in \{i_1,...,i_k\}$.
This means that for $j=1,...,k$: $U_x \cap supp(f_{i_j}) \neq \emptyset$.
That's the point where I am stuck. Hints, Solutions or corrections (in case my approach was wrong) would be appreciated.
Let $x\in X$ and take a neighborhood $U_x$ of $x$ such that $U_x\cap\operatorname{supp}(f_i)=\emptyset$ if and only if $i\in I\setminus F$, for some finite subset $F$ of $I$. Then, on $U_x$, $f=\sum_{i\in F}f_i$, which is a finite sum of continuous functions. Therefore, it is continuous. Since $f|_{U_x}$ is continuous and $U_x$ is a neighborhood of $x$, then $f$ is continuous at $x$.