Read this and answer the question

The elevator motor was located at the top of the shaft or beside the bottom of the shaft. Pushing the handle forward would cause the cab to rise; backwards would make it sink. The harder the pressure, the faster the elevator would move. The handle also served as a dead man switch: if the operator let go of the handle, it would return to its upright position, causing the elevator cab to stop. In time, safety interlocks would ensure that the inner and outer doors were closed before the elevator was allowed to move.

Eventually safety locks were used to guarantee what?
that the inner and outer doors were closed before the elevator was allowed to move