Added creation of temp file in folder.