def update_list_index(file_list, index, amount):
    """Increment the file index by a specified amount, accounting for rollover.

    Parameters
    ---
    file_list: list
    index: int
    amount: int

    Returns
    ---
    int
    """

    index += amount
    return index % len(file_list)