fix captureout to write directly to scratch