Set downloaded file name.

Plus some little fixes.