handle html files when downloading