Modified to manage IO exception with USB Serial Port Converter