_closeCurrImageFile now only closes a file if it exists