branch safeshutdown initially added.
Safe shutdown feature added.