Remove console correctly

This time in which I don't break *nix stdout output support.