Added defrag status checker function