Improve BTerminalIOHandler