Delete exit() preceded by HTTPResponse::send and some improvement in download method