added error-handling for if dlopen() fails