Added in a way to change the InputStream for the CommandThread.