protected function handleFile(File $file, Response $response)
 {
     if (isset($this->filesContents[$file->getPath()])) {
         return $this->filesContents[$file->getPath()];
     }
     $file->getContents()->then(function ($contents) use($file) {
         $this->filesContents[$file->getPath()] = $contents;
         return $file->close()->then(function () use($contents) {
             return $contents;
         });
     })->then(function ($fileContents) use($response) {
         $response->writeHead(200);
         $response->end($fileContents);
     });
 }