error handling of crawler.py