Added some file checking for the index page and a 404 page.