fixed issue with creating missing directories. not the best solution, but sufficient for now