Fix test file generator