correct location of image write