Try sd.put()ing temp file rather than temp file name