Subject: Download codes, packages and bundle(NOT OPTIMIZED).

Description:
Subject: Seperate functions to write package and to increment download
count.

Description: