Replace assert with debug string in speed test