fixed some bugs while do self testing and add more logs for services