fixed the download mechanism, so that not any file from the filesystem can be downloaded