Added download files system and fixed some bug