change how image is written to disk for debugging