It doesn't matter whether the damage has been done intentionally or unintentionally, but you cannot force the person to compensate for the damage by deducting the amount from their salary. However, if they agree to it, then only can you proceed with deducting money from their salary.
Contractual Obligations
Additionally, as the worker was on a contract basis, you need to refer to the contract agreement and see what is mentioned in case of damages. If it is not clearly specified, discuss the issue with the contractor.
Handling Minor Damages
Furthermore, if the damage is minor and not significant, you may consider not escalating the issue and simply issuing a strict warning that such incidents will not be tolerated in the future, with the warning of strict action if a similar situation occurs.