fix file download and handle https
add certs for testing purpose