added some error handling for files that like to break fits standards:
- headers that seems to be missing an "END"
- DATAMIN/DATAMAX that are reported as nan
 fixes are cosmetic and work with DS9, not tested with other programs