ADD: write the registered image to file