blob: fix possible segfault on OOB b->cfg.file access

Also add check for non-NULL b->cfg.file.