Bug-22308: Moved error check inside if block to fix live mode.