improve error handling in case of program linking problems