Updated file loading part for production mode