to legally take care of a problem before it's too late or before the problem gets worse
if you have a house and a groundhog living under your front porch, you better snare the groundhog before your foundation is destroyed. In this scenario, this phrase IMHO is therefore more than just friendly advice.