ensure public directory is set