Properly encoding content disposition (i.e. download filename).
Use log instead of println.