Add error pages. Fix permissions script.