cleaning up shutdown hook w.i.p