adding console log to debug image print