Added error handling for extension loading