adds some more relevant error reporting