Close input stream via try-block when calculating digest
Close input stream after reading TIFF metadata