Add  SetConsoleCtrlHandler for closing serial port connection