State Laws vary on this topic, you need to consult with a $ 200/hour professional answerer of such questions. Good Luck. I am sure that you have some type of recourse, but suing the slimeball who stuck you may be your only way to relief.
You can walk into any lawyer's office and say: "If I pay you $500.00, will you answer two questions for me?"
The lawyer will reply: "Sure...what's your second question."
As already stated, every state differs on it's lien laws. In TN, no sub can file a lien - only the GC. You'll need to either study your state's laws or consult the aforementioned lawyer.
In Texas, a subcontractor can lien if not paid for work. An exception is made for government buildings. We've been left a couple of times with no option but to lien. Sure upsets people. I did go to a lawyer after a lot of research on the web. There are some very specifically timed letters that must be sent to notify the people involved.