try catch for index page and others