write file to /tmp