Added prof_on_shutdown hook
Added call to plugins_on_shutdown hook