cleft sentences
The it is frame that puts one part of a sentence in focus.
A cleft sentence splits one clause so one piece is stressed: It was the lock that failed. What failed was the lock. Use the frame when the focus is the point. Do not stack clefts. A plain sentence is usually better: The lock failed.
Examples
Use The lock failed.
Use It was the lock that failed. (If you need that focus.)
Avoid It was the lock that was what failed.