private function insertFile($record, array $options = [])
    {
        $record += [
            '_id' => new MongoId(),
            'uploadDate' => new MongoDate(),
            'chunkSize' => $this->defaultChunkSize,
        ];

        $result = $this->insert($record, $options);

        if (! $this->isOKResult($result)) {
            throw new \MongoException('error inserting file');
        }

        return $record;
    }