used logger to replace system error in shutdown handler