change the download call to use window.location.assign instead of window.open, to be more clean and avoid popup-blocker/browser security problems