Better error reporting and handling.