Add subdir after writefile to save scripts into separate directory