Added error messages if index doesn't exist