handling ctrl-c on windows