diff -urN --strip-trailing-cr BitcasaDiff-20140717b/BitcasaDiff/BitcasaDiff.cpp BitcasaDiff-20140718/BitcasaDiff/BitcasaDiff.cpp
--- BitcasaDiff-20140717b/BitcasaDiff/BitcasaDiff.cpp	2014-07-16 12:05:34.000000000 +0900
+++ BitcasaDiff-20140718/BitcasaDiff/BitcasaDiff.cpp	2014-07-18 01:32:52.000000000 +0900
@@ -309,7 +309,7 @@
 				if (datestr != NULL) {
 					process_datestr(datestr, param);
 					if (param.usedatefilter){
-						_ftprintf(stderr, _T(" date : %s - %s\n"), filetimestr(param.startdate).c_str(), filetimestr(param.enddate).c_str());
+						fwprintf(stderr, L" date : %s - %s\n", UTF8toWideChar(filetimestr(param.startdate)).c_str(), UTF8toWideChar(filetimestr(param.enddate)).c_str());
 					}
 				}
 				continue;
Binary files BitcasaDiff-20140717b/BitcasaDiff/BitcasaDiff.rc and BitcasaDiff-20140718/BitcasaDiff/BitcasaDiff.rc differ
diff -urN --strip-trailing-cr BitcasaDiff-20140717b/BitcasaDiff/diffBitcasa.cpp BitcasaDiff-20140718/BitcasaDiff/diffBitcasa.cpp
--- BitcasaDiff-20140717b/BitcasaDiff/diffBitcasa.cpp	2014-07-13 01:53:34.000000000 +0900
+++ BitcasaDiff-20140718/BitcasaDiff/diffBitcasa.cpp	2014-07-18 19:33:14.000000000 +0900
@@ -71,7 +71,7 @@
 					}
 					if (!it->second.second.id.empty()){
 						std::wcerr << " remote hash check:" << it->second.second.name << std::endl;
-						it->second.second.hashstr = RemoteFileHash(API, it->second.second.id, it->second.second.size, param.hashtype);
+						it->second.second.hashstr = RemoteFileHash(API, it->second.second.path, it->second.second.size, param.hashtype);
 					}
 					same = same && (it->second.first.hashstr == it->second.second.hashstr);
 					if (param.verbose){
diff -urN --strip-trailing-cr BitcasaDiff-20140717b/BitcasaDiff/listBitcasa.cpp BitcasaDiff-20140718/BitcasaDiff/listBitcasa.cpp
--- BitcasaDiff-20140717b/BitcasaDiff/listBitcasa.cpp	2014-07-16 12:05:56.000000000 +0900
+++ BitcasaDiff-20140718/BitcasaDiff/listBitcasa.cpp	2014-07-18 19:33:14.000000000 +0900
@@ -294,7 +294,7 @@
 INT64 size;
 Tick starttick;
 
-std::wstring RemoteFileHash(BitcasaAPI& API, std::string fileid, INT64 filesize, HashFilter::Hash hashtype)
+std::wstring RemoteFileHash(BitcasaAPI& API, std::string filepath, INT64 filesize, HashFilter::Hash hashtype)
 {
 	int retrycount = 3;
 	while (retrycount-- > 0){
@@ -303,7 +303,7 @@
 		size = filesize;
 		fwprintf(stderr, L"download...\n");
 		bool done = API.DownloadFile(
-			fileid,
+			filepath,
 			hasher,
 			size,
 			[](INT64 trans){
@@ -350,7 +350,7 @@
 			if (!it.id.empty() && param.hashtype){
 				std::wcerr << loopi << "/" << loopmax <<" hash check:" << it.name << std::endl;
 
-				it.hashstr = RemoteFileHash(API, it.id, it.size, param.hashtype);
+				it.hashstr = RemoteFileHash(API, it.path, it.size, param.hashtype);
 				if (param.faillog && it.hashstr.empty()){
 					std::wofstream logfail("fail_download.log", std::ios::app);
 					if (logfail){
diff -urN --strip-trailing-cr BitcasaDiff-20140717b/BitcasaDLL/BitcasaAPI.cpp BitcasaDiff-20140718/BitcasaDLL/BitcasaAPI.cpp
--- BitcasaDiff-20140717b/BitcasaDLL/BitcasaAPI.cpp	2014-07-16 23:54:06.405018900 +0900
+++ BitcasaDiff-20140718/BitcasaDLL/BitcasaAPI.cpp	2014-07-18 23:29:40.926793000 +0900
@@ -21,9 +21,9 @@
 const std::string API_Profile(APIbase + "/user/profile");
 
 #ifdef _WIN64
-int maxdownloadthread = 10;
+int maxdownloadthread = 6;
 #else
-int maxdownloadthread = 4;
+int maxdownloadthread = 2;
 #endif
 
 void SetMaxDownloadThread(int thread){
@@ -310,8 +310,8 @@
 
 		if (bitcasa.response.code == 200) break;
 
-		std::wcout << "Grant access_token failed" << std::endl;
-		std::wcout << bitcasa.response.code << std::endl;
+		std::cerr << "Grant access_token failed" << std::endl;
+		std::cerr << bitcasa.response.code << std::endl;
 	}
 	if (retrycount == 0) return 1;
 
@@ -536,6 +536,7 @@
 	HttpsClient *bitcasa;
 	std::string *access_token;
 	std::string *URI;
+	std::string *filepath;
 	int retrycount = retrymax;
 public:
 	const int master_retrymax = 5;
@@ -549,16 +550,18 @@
 	INT64 len;
 	array<System::Byte>^ buf;
 
-	threadwork(std::string url, std::string token){
+	threadwork(std::string path, std::string token){
 		bitcasa = new HttpsClient();
 		readySlave = CreateEvent(NULL, false, false, NULL);
 		readyMaster = CreateEvent(NULL, false, false, NULL);
 		die = CreateMutex(NULL, false, NULL);
 		access_token = new std::string;
+		filepath = new std::string;
 		URI = new std::string;
 		buf = gcnew array<System::Byte>(0);;
-		*URI = url;
+		*URI = API_Files + "/test";
 		*access_token = token;
+		*filepath = path;
 	}
 	~threadwork(){
 		this->!threadwork();
@@ -567,6 +570,7 @@
 		CloseHandle(readySlave);
 		CloseHandle(readyMaster);
 		delete access_token;
+		delete filepath;
 		delete URI;
 		delete buf;
 		delete bitcasa;
@@ -581,6 +585,7 @@
 				break;
 			bitcasa->Clear();
 			bitcasa->request.query["access_token"] = *access_token;
+			bitcasa->request.query["path"] = *filepath;
 			bitcasa->AddHeader("Range", dynamic_cast<std::stringstream &>(std::stringstream() << "bytes=" << offset << "-" << (offset + len - 1)).str());
 			if (bitcasa->GET(*URI) != 0){
 				SetEvent(readySlave);
@@ -591,15 +596,9 @@
 				break;
 			}
 
-			if (bitcasa->response.code == 503){
-				SetEvent(readySlave);
-				Sleep(1000 * 10);
-				if (--retrycount > 0)
-					continue;
-				SetEvent(failDownload);
-				break;
-			}
 			if ((bitcasa->response.code != 200) && (bitcasa->response.code != 206)) {
+				std::wcerr << "download error" << bitcasa->response.code << "    " << std::endl;
+				//std::cerr << std::string(bitcasa->response.body.begin(), bitcasa->response.body.end()) << std::endl;
 				buf = gcnew array<System::Byte>(0);
 				SetEvent(readySlave);
 				Sleep(1000 * 10);
@@ -628,7 +627,7 @@
 
 //File Operations
 // Download/Stream File
-bool BitcasaAPI::DownloadFile(std::string encoded_file_id, std::wstring filename, INT64 wantSize, void(CALLBACK *callback)(INT64 trans))
+bool BitcasaAPI::DownloadFile(std::string encoded_file_path, std::wstring filename, INT64 wantSize, void(CALLBACK *callback)(INT64 trans))
 {
 	std::ofstream fout;
 	if (!filename.empty()){
@@ -638,18 +637,12 @@
 			return false;
 		}
 	}
-	return DownloadFile(encoded_file_id, (filename.empty()) ? std::cout : fout, wantSize, callback);
+	return DownloadFile(encoded_file_path, (filename.empty()) ? std::cout : fout, wantSize, callback);
 }
 
-bool BitcasaAPI::DownloadFile(std::string encoded_file_id, std::ostream& out, INT64 wantSize, void(CALLBACK *callback)(INT64 trans))
+bool BitcasaAPI::DownloadFile(std::string encoded_file_path, std::ostream& out, INT64 wantSize, void(CALLBACK *callback)(INT64 trans))
 {
 	if (wantSize < 0) return false;
-	if (encoded_file_id.empty() || (encoded_file_id.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_=") != std::string::npos)){
-		std::wcerr << "Invalid File id" << std::endl;
-		return false;
-	}
-	std::string URI = API_Files + "/" + URLencode(encoded_file_id) + "/";
-	//std::wcerr << "download.";
 
 	const int transbytes = 64 * 1024 * 1024;
 	INT64 offset = 0;
@@ -663,7 +656,7 @@
 	std::vector<HANDLE> waithandles;
 	HANDLE failDownload = CreateEvent(NULL, true, false, NULL);
 	for (int i = 0; i < threadcount; i++){
-		threadwork^ work = gcnew threadwork(URI, WideChartoUTF8(access_token));
+		threadwork^ work = gcnew threadwork(encoded_file_path, WideChartoUTF8(access_token));
 		data.Add(work);
 		HANDLE h = work->readyMaster;
 		waithandles.push_back(h);
@@ -681,7 +674,7 @@
 		work->offset = offset;
 		SetEvent(work->readySlave);
 		offset += work->len;
-		Sleep(5*1000);
+		Sleep(1000);
 	}
 	try{
 		while (working > 0){
diff -urN --strip-trailing-cr BitcasaDiff-20140717b/BitcasaDLL/BitcasaAPI.h BitcasaDiff-20140718/BitcasaDLL/BitcasaAPI.h
--- BitcasaDiff-20140717b/BitcasaDLL/BitcasaAPI.h	2014-04-23 18:21:34.000000000 +0900
+++ BitcasaDiff-20140718/BitcasaDLL/BitcasaAPI.h	2014-07-18 19:32:24.000000000 +0900
@@ -53,10 +53,10 @@
 	inline bool UploadFile(std::wstring encoded_path, std::wstring infilename){
 		return UploadFile(WideChartoUTF8(encoded_path), infilename);
 	}
-	bool DownloadFile(std::string encoded_file_id, std::ostream& out, INT64 wantSize = -1, void(CALLBACK *callback)(INT64 trans) = NULL);
-	bool DownloadFile(std::string encoded_file_id, std::wstring filename, INT64 wantSize = -1, void(CALLBACK *callback)(INT64 trans) = NULL);
-	inline bool DownloadFile(const std::wstring &encoded_file_id, const std::wstring &filename, INT64 wantSize = -1){
-		return DownloadFile(WideChartoUTF8(encoded_file_id), filename, wantSize);
+	bool DownloadFile(std::string encoded_file_path, std::ostream& out, INT64 wantSize = -1, void(CALLBACK *callback)(INT64 trans) = NULL);
+	bool DownloadFile(std::string encoded_file_path, std::wstring filename, INT64 wantSize = -1, void(CALLBACK *callback)(INT64 trans) = NULL);
+	inline bool DownloadFile(const std::wstring &encoded_file_path, const std::wstring &filename, INT64 wantSize = -1){
+		return DownloadFile(WideChartoUTF8(encoded_file_path), filename, wantSize);
 	}
 	bool _DeleteFile(std::string encoded_path);
 	inline bool _DeleteFile(const std::wstring &encoded_path){
