Added test file generator to code