The answer to your question is probably "yes," he can file a lien.
A contractor can file a mechanics lien on a construction project if he is owed money. The lien is just a "claim" that the contractor is owed the money. If there is a reasonable dispute between the owner and the contractor as to whether the money is or is not actually owed, the lien claim is likely going to be held valid. The judge deciding the merits of the lien claim will likely not look to the actual dispute, leaving that dispute to be decided later by a trial court, who will take testimony and make a final decisions.
Mechanic liens can be removed if they are filed incorrectly. If, for example, they were not filed on time, did not contain the required information, were filed in an incorrect county, if a required notice was not delivered, etc.
If the lien is just in dispute -- i.e. the parties dispute whether the payment is owed -- this USUALLY won't get the lien removed, unless it is obvious. See the articles I wrote about this, as well as information about services we offer to remove mechanic liens, in the links associated with this answer.