Implementing: Extracted open chain and close chain methods
Implementing: Using open/closechain in RemoveDirectory