check status before programming