Updating BridgeService.php to check if the directory exists.