add in shutdown to avoid having too many open sockets/files