if ($ignoreMissing && !is_file($file)) {
        return false;
    }

perhaps?