Added logging when writing out 8-bit images