add register_shutdown_function()