fixed bug with automatically creating directories needed