correct current dirname get method