You may want to use mktemp here