Added some debug logging and added give-up-time for shutdown