don't modify earlierdirs if cd fails