Added "lock" to new door function to prevent double opening