Added check to ensure serial port is open in manager