Fixed error logging for exceptions during site loading