make external blob output conditional on debug flag.