changed close() to shutdown()