Add download_package helper function