<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_kb_mappings_file(kbname, kbfile, separator):
 """Add KB values from file to given KB returning rows added."""

    num_added = 0
    with open(kbfile) as kb_fd:
        for line in kb_fd:
            if not line.strip():
                continue
            try:
                key, value = line.split(separator)
            except ValueError:
                # bad split, pass
                current_app.logger.error("Error splitting: {0}".format(line))
                continue
            add_kb_mapping(kbname, key, value)
            num_added += 1
    return num_added