Some improvements done to actions.download().