downloadFile method now overwrites file, so you can pass File.createTempFile() as download destination.