Use magic bytes search as a fallback in case the file is truncated