Added really defensive error handling when loading extensions