SPARK-3014. Log a more informative messages in a couple failure scenario...

...s
On third thought, I don't really think the assert is useful.  Adding it back in would require adding "|| finished", which basically makes it look exactly the same as the while loop condition above.  It doesn't make the code any easier to understand.