def get_log_filepath(conf):
    """Assuming a valid conf containing the `datastores` key, retrieves the
    'location' key of an object in the `datastores` list whose `type` is "file".

    Default is `./tasks/`.
    """
    return next(
        filter(lambda ds: ds.get('type').lower() == 'file', conf.get('datastores')),
        {'location': './tasks/'}
    ).get('location')