 
   fileprivate func addHandlerForLocalFileSystem() {
     localServer.addHandler(match: { (requestMethod, requestURL, requestHeaders, URLPath, URLQuery) -> GCDWebServerRequest! in
+    localServer.addHandler(match: { (requestMethod, requestURL, requestHeaders, urlPath, urlQuery) -> GCDWebServerRequest! in
       if requestMethod != "GET" { return nil }
-
-      if !(URLPath?.hasPrefix(localFileSystemPath))! { return nil }
-
-      let filePath = URLPath?.substring(from: localFileSystemPath.endIndex)
-      let fileURL = URL(fileURLWithPath: filePath!)
+      guard let urlPath = urlPath else { return nil }
+
+      if !(urlPath.hasPrefix(localFileSystemPath)) { return nil }
+
+      let filePath = urlPath.substring(from: localFileSystemPath.endIndex)
+      let fileURL = URL(fileURLWithPath: filePath)
       if fileURL.isRegularFile != true { return nil }
 
-      let request = GCDWebServerRequest(method: requestMethod, url: requestURL, headers: requestHeaders, path: URLPath, query: URLQuery)
+      let request = GCDWebServerRequest(method: requestMethod, url: requestURL, headers: requestHeaders, path: urlPath, query: urlQuery)
       request?.setAttribute(filePath, forKey: GCDWebServerRequestAttribute_FilePath)
       return request
       }) { (request) -> GCDWebServerResponse! in


  fileprivate func addHandlerForAssetBundle() {
    localServer.addHandler(match: { [weak self] (requestMethod, requestURL, requestHeaders, URLPath, URLQuery) -> GCDWebServerRequest! in
      if requestMethod != "GET" { return nil }
      guard let asset = self?.currentAssetBundle?.assetForURLPath(URLPath) else { return nil }

      let request = GCDWebServerRequest(method: requestMethod, url: requestURL, headers: requestHeaders, path: URLPath, query: URLQuery)
      request.setAttribute(Box(asset), forKey: GCDWebServerRequestAttribute_Asset)
      return request
    }) { (request) -> GCDWebServerResponse! in

  }

  fileprivate func addHandlerForWwwDirectory() {
  private func addHandlerForWwwDirectory() {
    localServer.addHandler(match: { [weak self] (requestMethod, requestURL, requestHeaders, urlPath, urlQuery) -> GCDWebServerRequest! in
      if requestMethod != "GET" { return nil }
      guard let urlPath = urlPath else { return nil }

      // Do not serve files from /application, because these should only be served through the initial asset bundle
      if (urlPath.hasPrefix("/application")) { return nil }

      guard let fileURL = self?.wwwDirectoryURL?.appendingPathComponent(urlPath) else { return nil }
      if fileURL.isRegularFile != true { return nil }

      let request = GCDWebServerRequest(method: requestMethod, url: requestURL, headers: requestHeaders, path: URLPath, query: URLQuery)
      let request = GCDWebServerRequest(method: requestMethod, url: requestURL, headers: requestHeaders, path: urlPath, query: urlQuery)
      request?.setAttribute(fileURL.path, forKey: GCDWebServerRequestAttribute_FilePath)
      return request
    }) { (request) -> GCDWebServerResponse! in
