def get_file_metadata(root):
    """Read and parse ReSpecTh XML file metadata (file author, version, etc.)

    Parameters
    ----------
    root : ``etree.Element``
        root of ReSpecTh XML file

    Returns
    -------
    properties : dict
        Dictionary with file metadata

    """
    properties = {}
    properties['file-authors'] = [{'name': '', 'ORCID': ''}]
    try:
        properties['file-authors'][0]['name'] = root.find('fileAuthor').text
    except AttributeError:
        print('Warning: no fileAuthor given')
    properties['file-version'] = '(1, 0)'
    elem = root.find('fileVersion')
    if elem is None:
        print('Warning: no fileVersion element')
    try:
        version = int(elem.find('major').text), int(elem.find('minor').text)
    except AttributeError:
        print('Warning: missing fileVersion major/minor')
    properties['file-version'] = str(version)
    properties['reference'] = {}
    elem = root.find('bibliographyLink')
    try:
        properties['reference']['citation'] = elem.attrib['preferredKey']
    except KeyError:
        print('Warning: missing preferredKey attribute in bibliographyLink')
    try:
        properties['reference']['doi'] = elem.attrib['doi']
    except KeyError:
        print('Warning: missing doi attribute in bibliographyLink')
    return properties
