Compartmentalized simple file write operations in writeFile(), moved writeFiles() to getFiles().