change directory of writeToFile
write the last file to output
Merge remote-tracking branch 'origin/master'
1117