def check_fileflag(fileflags, expect_flag, logger):
    """Check the file flags """
    if fileflags == expect_flag:
        logger.info('file flags include %s.' % expect_flag)
        return True
    else:
        logger.error("file flags doesn't include %s." % expect_flag)
        return False
