Fix run_function, print_csv