File output test.
Closing files code added.