move run_ircscraper function outside main loop