write files to root tmp directory