Added better error handling to MessengerAdapterFactory.cs