Fix downlaod mode, Add onend options