Updated file generation and fixed test.