Added card present check
More fixes. Moved thread.sleep in the thread so the GUi does not hang