trying to fix tmpfile creation - it's breaking on heroku