Improve error handling when scraping messages
Write progress so far to output file when debugging