Bug fix in closeout script