Fix for directory bug - will create generation directory if it doesn’t exist already