Fixing issue with running createRequiredDirectories on session start