Added close() and shutdown()