Add some exception handling and redirect for the index