moved temporary file creation to /tmp