added download_file function
delete temp files