write_database_helper(&ctx, db);
} else {
log_module(MAIN_LOG, LOG_ERROR, "Exception %d caught while writing to stream", res);
write_database_helper(&ctx, db);
} else {
log_module(MAIN_LOG, LOG_ERROR, "Exception %d caught while writing to stream", res);