add a flag for downloadFile about whether we want to download file directly to string