Save plugins on shutdown signal.. and closed at the same time.