Catch AttributeError and log a critical error