Let $(X,E)$ be a CW complex, and $Y$ be any space. Prove that a function $f:X\to Y$ is continuous if and only if $f\Phi_{e}$ is continuous for all $e\in E$.
The map $\Phi_{e}$ is the characteristic map for the cell $e$, i.e. $\Phi_{e}:(D^{n},S^{n-1})\to (e\cup X^{(n-1)},X^{(n-1)})$.
Necessity is obvious, so the sufficiency is the problem here. I tried to solve this problem by showing that restriction of $f$ to each closure $\bar{e}$ is continuous and use the weak topology of $X$. It is easy to prove that Restriction of $f$ to each 'open' cell $e$ is continuous since characteristic maps are relative homeomorphisms. But I can't figure out a way to extend this result to whole of $\bar{e}$. Can anyone help me with problem? Please enlighten me.