better handling of downloaded filename