VMS: do not prematurely close the JPEG file