do not forget to close ports on shutdown