Improve BTerminalIOHandler::readLine() method