Add check for real_optlay error.