def build_output_files(cfgin, note):
    """Build the paths to the output files

    Parameters
    ----------
    cfgin : ConfigParser
        Configuration details for the run
    note : int
        Realization specific path details

    Returns
    -------
    out_chain : str
        Output file name for the chain
    out_like : str
        Output file name for the likelihood
    """
    simtype = cfgin['General']['simtype']
    prior = cfgin['MCMC']['prior']
    if simtype == 'synth' or simtype == 'synth10':
        catalog = cfgin['General']['synth_catalog']
        out_chain = './outputs/{}/chains/mcmc{}_{}prior_richest{}.out'.format(
            catalog, note, prior, cfgin['SurveyInfo'].getint('nclusters'))
        out_like = './outputs/{}/chains/lnL{}_{}priors.out'.format(catalog, note, prior)

    elif simtype == 'real':
        out_chain = './outputs/real_runs/chains/mcmc_{}priors.out'.format(prior)
        out_like = './outputs/real_runs/chains/lnL_{}priors.out'.format(prior)

    else:
        raise TypeError("Simulation type {} is an invalid type.".format(simtype))

    return out_chain, out_like