def add_file_to_dict(dictionary, file):
    """
    Populates a dictionary with
        key: file name
        value: number of instances in the  directory
    Args:
        dictionary: dictionary of file names
        file: file name to be added to dictionary
    Returns:
        The modified dictionary
    """
    # If file exists in dictionary
    if file in dictionary:
        # Add number of instances of the file
        dictionary[file] += 1
    # If file does not exist
    else:
        # Add it to our dictionary
        dictionary[file] = 1
    return dictionary