Handling file exist when downloading a file in the proper way