fix typo; only enumerate dir if source exists