def compare_file(file1, file2):
    """
    Compare two file, line by line
    """
    line1 = True
    line2 = True
    with open(file1, 'r') as f_1, open(file2, 'r') as f_2:
        while line1 and line2:
            line1 = f_1.readline()
            line2 = f_2.readline()
            if line1 != line2:
                return False
    return True