Conditionally removing sterror calls