Refine check status function