Converted scraper to emitting events and errors