added saveSubmissionDocument function, which also stores the file in the path