changed the order of parameters and some refactoring for file download
Merge pull request #23 from shyamalan/master

changed the order of parameters and some refactoring for file download