Added support to download locally/remotely