Added more tracing to image processing.