added 'addValue:forHTTPHeaderField' method
added a call back method for write file failed