use File.join in download function