implicit close of outfile with 'with' block