database error checking at initialization