How to analyze $\{|f(z)|\le M\}$ is bounded? 
Given a continuously differentiable function $f:\mathbb{R^2}\to\mathbb{R^2}$. If $\{x : \det Jf(x)=0 \}$ is finite, and for each positive constant $M$,  $\{z\in \mathbb{R^2} :|f(z)|\le M\}$ is bounded. Prove that $f$ is surjective.

My attempt
I wanted to prove that $ f(\mathbb{R^2})$ is open and closed. In order to do this I proved that $f(\mathbb{R^2}\setminus\{x : \det Jf(x)=0 \})$ is open. I wanted to prove then that $f(\mathbb{R^2})$ is closed. But I got stuck on how to use the condition that $\{z\in \mathbb{R^2} :|f(z)|\le M\}$ is bounded.
Any hints? Thanks in advance!
 A: I'd like to share an answer to my own question now.
Proof : 

  
*
  
*$f(\mathbb{R^2})$ is closed.
  

Given $y^0\in  \overline{f(\mathbb{R^2})}$. Then there exists a sequence of points $\{ y^k=f(x^k)\}_{k\ge1}$ convergent to $y^0$. Then via the condition of boundness we know $(x^k)$ is bounded, and hence there exists a subsequence $(x^{n_k})$ convergent to some point, say $x^0$. Then we know form the continuity that $\lim_{k\to \infty} f(x^{n_k})=f(x^0)$, which implies that $y^0=f(x^0)$. Thus $f(\mathbb{R^2})$ is closed.


  
*$f(\mathbb{R^2}\setminus \{x:\det Jf(x)=0\})$ is open.
  

Just note that $\{x:\det Jf(x)=0\}$is a finite set, and hence $\mathbb{R^2}\setminus \{x:\det Jf(x)=0\}$ is open. Then via inverse function theorem we know  $f(\mathbb{R^2}\setminus \{x:\det Jf(x)=0\})$ is open.


  
*$f$ is surjective
  

Suppose for contradiction that $f$ is not surjective. Thus $\mathbb{R^2}\setminus f(\mathbb{R^2})$ and $f(\mathbb{R^2}\setminus \{x:\det Jf(x)=0\})$ are two nonempty open sets in the union of them, which is derived by removing finitely many points in $\mathbb{R^2}$. That is a contradiction, since the topopogy space derived by removing finitely many points in $\mathbb{R^2}$ is connected.
