manage_file function

Manage the downloaded file