Fixed writeSubmission to add newlines at the end of an entry.