Add blocking detection code