Moved the creation of the reading thread after a delay; added a couple of try/catch blocks