CreatePorts might be better. Generate doesn't usually have side effects, which it does here