get the tests passing for file output, needed a file.close at the end of the method