Update debug.func

log_close function added