improved index error output