def check_file_type(file_name):
    """
    identifies LGR (.xml) and GenBank (.gk/gbk) files
    will print an error message and exit the application if other files are specified
    """
    if file_name.endswith(".xml"):
        return "lrg"
    elif file_name.endswith(".gb") or file_name.endswith(".gbk"):
        return "gbk"
    else:
        raise Exception("This program only works for GenBank and LRG files")