Log theme loading error when it happens and not later (#14517)

Change-Id: I0d19e1c53dfe48a9a501ff25c19318b96c96ef3b