If an employer enters into a contract, written or verbal, with an independent contractor to do part of such employer's work, or if such contractor enters into a contract, written or verbal, with a subcontractor to do all or any part of such work comprised in such contractor's contract with the employer, such contract or subcontract shall not bar the liability of the employer for injury caused to an employee of such contractor or subcontractor by any defect in the condition of the ways, works, machinery or plant if the defect arose or had not been discovered and remedied through the negligence of the employer or some one intrusted by him with the duty of seeing that they were in proper condition. This section shall apply only to actions arising under this article.
N.J.S. § 34:15-3