Closed resource outputFile2

Removed two useless variables too