Added debug messages to spawn