graceful system shutdown - WIP