improve func_run_file