Slightly improved error reporting