fix checking existence of the same directory three times