minor tweaks in download_file function

this will no longer remove the file if the content was to short now?