The door lock, but

Of course, you need to take care of the door lock, but problems with it may appear due to improper installation. So how do you need to install and take care of the door locks so that they never let their owners?