Fix logic issue and improve test process for process service check