This post is quite informative but not completely accurate for Massachusetts. It is quite dangerous to wait until the last minute to file a lien, as the article says, because a mistake in filing can be fatal.
In MA, unlicensed contractors can file liens. They just have to have a written contract with the GC or owner.
Suit has to be filed within 90 days after the filing of the lien, and an attested copy of the complaint has to be filed at the registry of deeds within 30 days after filing suit.
I have never heard of a lien being invalidated because the amount owed was "too high."
In any event, this is a good article with important information, particularly with regard to the ownership of the property.