get name & function_name
output to file, with problem, file reopen
fix bug about output file