catch exceptions when loading dll