Removing invalid directory