Submission file generation code.