added better logs to updateDb