Move 'shutting down' msg to before close(teardown)