Allow keepSpawnInMemory to be configurable