write nsdata from urlconnection to doc directory file