slightly improved error captures