If the director deems that a contractor has failed to supply an adequate working force, or material of proper quality, or has failed to comply with Section 10262, or has failed in any other respect to prosecute the work with the diligence and force specified by the contract, the director may:
(a)
After written notice of at least five days to the contractor, specifying the defaults to be remedied, provide any such labor or materials and deduct the cost from any money due or to become due to the contractor under the contract; or
(b)
If he
considers that the failure is sufficient ground for such action, he may give written notice of at least five days to the contractor and the contractor’s sureties, that if the defaults are not remedied the contractor’s control over the work will be terminated.