added comment
using mkdtemp to create the temporary file