Update build_csv to understand contexts