def read_metadata(line, search_text, current_value):
    """
    Function to read simple header items in DynAdjust files
    :param line: DynAdjust header line
    :param search_text: header field required.
    :param current_value: stored value. Updated when search_text is successfully found.
    :return: either current value or string corresponding to search_text
    """
    if line[:35] == search_text.ljust(35, ' '):
        return line[35:].strip()
    else:
        return current_value