Final file generation