def bflag2str(bflag):
    """
    Args:
        bflag (dict): binary flag
    Returns:
        flag as binary string, keys
    """
    l = []
    #print("flag keys ", bflag.keys())
    #['plankton', 'small_Z_diff', 'melting_layer', 'too_many_peaks']
    keys = ['mod_calibration', 'unsecure_calibration', 'particle_influence',
            'removed_moments', 'melting_layer', 'plankton', 'low_snr', 'hs_higher_noise']

    if set(keys).issubset(set(bflag.keys())):
        for k in keys:
            l.append(str(bflag[k]))
    else:
        l = ['-1']

    return ''.join(l[::-1]), keys[::-1]