Title: A flow failure detector for powdered and granular materials