Chris,

The redirect should also be closed. Placed after the NEXT

Code:
$nul = RedirectOutput("")