Code now handles duplicate tickers and has improved logging.