Tried done() method as suggested by @travisjeffery - temp file still persists