Put the for loops for _LoadMarkets() and _RefreshMarkets() in try/except statements.