output images to correct dir