A recent question made me realize I didn't know any proof that exponential of a Lie algebra $\mathfrak g$ of a compact connected Lie group $G$ is surjective. After a bit of thinking I've come up with two proofs. First is based on relation between exponential curves and geodesics. This is rather technical but also gives us other useful information. This is not what I want to talk about here though.
The second proof (which I find slicker) is based only on topology and goes like this: Since $\exp$ is a local homeomorphism, it is both open and closed. Therefore $\exp(\mathfrak g)$ is clopen and so equal to $G$.
The trouble with this "proof" is that it also proves the statement for $G$ non-compact (which is false). So I wonder (and this is my question) what precisely went wrong.
Can the above mentioned "proof" be made into a real proof?
My thoughts on this are that $\exp$ is closed and open only when $G$ is compact because then we can pick a bounded open subset $C \subset \mathfrak g$ such that $\exp(C) = G$ and we can use the relation $\exp(A+\epsilon B) \approx \exp(A)\exp(\epsilon B)$ to conclude that $\exp$ is a local homeomorphism everywhere in $C$ (not just around $0$). This implies that $\exp$ is open (since it is locally open) in $C$. Also, since any closed subset of $C$ is compact, it's image is also compact and therefore closed in $G$.
Where exactly does this argument break down when $G$ is not compact.