Don't use report_file_error; do it by hand using dlerror.