def print_filename(path):
    """
    Print out lipd filename that is being read or written

    :param str path: all file metadata
    :return str: filename
    """

    if os.path.basename(path):
        return os.path.basename(path)
    return path