$opt is checked in line 44.