add startup_cleanup to be ran after --close also