include better error reporting