Make the script state aware so that crawl can be stopped and restarted.