added st.err check