Fixed first time running issue with directories