add download functionality in local mode