Implemented the Door sensor to make sure that the door is closed before locking, so the door will never lock when it is left open.