remove invalid directory