Log a message if object creation fails.