Unused assignment.
Check for NULL before doing anything else
Cache handle from dlopen
In some strange cases, lseek may return an error
Check parameters passed to paircmp()
outfp may be MULL
The debug_stream needs to be in 'inst' to be used for debugging