use lprintf(LOG_ERR,...) instead of fprintf(stderr,...) to report errors opening or allocating memory for areas.bbs file.