More fault tolerance for guess_flavor and remove old files.