func URLWithPath(path: String) -> NSURL {
//return NSURL(string: path, relativeToURL: baseURL)! //will cause 404 error when visit url in Xcode8
//Use this way
var newUrl : NSURL
let str = (baseURL?.absoluteString)! + path
newUrl = NSURL(string:str)!
return newUrl
}