Fix bug in file generator.